Re: [PHP] General question: packaging in PHP

2005-01-30 Thread Vivian Steller
Thanks for your answer! Terje Slettebà wrote: >>From: "Vivian Steller" <[EMAIL PROTECTED]> > >> i've a general question concerning PHP's architecture. >> >> Why isn't there a native packaging concept in PHP? > > This was also s

[PHP] General question: packaging in PHP

2005-01-30 Thread Vivian Steller
Hello, i've a general question concerning PHP's architecture. Why isn't there a native packaging concept in PHP? I think php became much more powerfull with the extended OOP features introduced in PHP5 - without a packaging concept you couldn't use these features "in big business" (in terms of sh

[PHP] PHP5: ext/dom: Namespaces

2004-03-14 Thread Vivian Steller
hello, once again a post about the tricky namespaces. I played with the following functions concerning namespaces: domdocument->createElementNS domdocument->createAttributeNS domelement->setAttributeNS domelement->getAttributeNS (domelement->hasAttributeNS) as i found out the behavior of some fu

[PHP] PHP5: Segmentation Fault in ext/dom

2004-03-04 Thread Vivian Steller
Hello, i know that this post should better been sent to bugs.php but making my first experiences on segmentation faults i can't identify the right causes to report it... have a look and help me getting right informations to post the bug so that it can be solved. Error type: ''' error_log

[PHP] Re: php5

2004-03-03 Thread Vivian Steller
hi again, i forgot adding the attributes, sorry :) here it is... >> I need manipulate the nodes (add and remove) . >> example >> I need add more one node >> > subnet="24"/> > > // create a new node > $newInterfaceNode = $doc->createElement("interface"); > // append this n

[PHP] Re: php5

2004-03-02 Thread Vivian Steller
Carlos wrote: > hello ... I'm working with simplexml (php5) to manipulate the data in > xml file, but I'm having one problem. i'm not familiar with simplexml but with the dom functions and i think (as simplexml is based on dom) the simplexml objects will work with dom objects as well?! otherwise

[PHP] PHP5: static class variables

2004-03-02 Thread Vivian Steller
hello again, once again a question about class properties, this time more reasonable... Is there a possibility to check wether a static variable is set or not? will not show $var, cause it's static. an expression like if(MyClass::$somevar) {...} ends up to a fatal error because $som

[PHP] Re: check if a variable is declared as private

2004-03-02 Thread Vivian Steller
Jakes wrote: > The word private says it all - If you create a object, > you are not going to be able to use it, because its > private to that class. Its a class variable, not a object variable > oh, yeah - your right of course... taking a look at get_object_vars($obj) output doesn't show private

[PHP] PHP5: check if a variable is declared as private

2004-03-02 Thread Vivian Steller
Hello, is it possible to check if a variable declared as "private"? I do not want to use reflection api in this case... best regards, vivi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP5: Class behavior: method overloading

2004-02-26 Thread Vivian Steller
Hello, in the latest snapshot i found some very important differences to the php5 beta 4 version concerning the behavior of inherited classes. please look at the following example: the output is: Fatal error:  Declaration of MyClass::test() must be compatible with that of MyParent::test() in

[PHP] Re: [PHP-DEV] PHP5: Class behavior: method overloading

2004-02-26 Thread Vivian Steller
Walter A. Boring IV wrote: > I say keep compatibility. If you want to enforce this, then declare an > interface. That is after all why they exist. > > Walt ... Would be nice if you could give a simple example - i really have problems working with interfaces :( My problem was to design a files

[PHP] Re: PHP5: Directory & DirectoryIterator

2004-02-25 Thread Vivian Steller
Ben Ramsey wrote: >> using PHP5 Beta 4 I saw some new classes like DirectoryIterator with nice >> methods like: >> > > Where did you see these classes? Is it a PEAR package? I haven't seen > these in the PHP manual. > You can find them using the following function: function printDeclaredCla

[PHP] PHP5: Directory & DirectoryIterator

2004-02-25 Thread Vivian Steller
Hello, using PHP5 Beta 4 I saw some new classes like DirectoryIterator with nice methods like: __construct rewind hasMore key current next getPath getFilename getPathname getPerms getInode ... but i don't kno

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-17 Thread Vivian Steller
Rob Richards wrote: > From: Christian Stocker > >> > $node->setAttributeNS("http://www.w3.org/2000/xmlns/";, "xmlns:b", >> > "http://www.somedomain.de/";); >> > > >> IMHO, that would be very confusing. >> >> I liked the idea by vivian with a third optional namespaceURI argument >> for the elemen

[PHP] PHP5: ext/dom: Namespace & Prefix unexpected behavior

2004-02-17 Thread Vivian Steller
Hello, checking out the behavior of Namespaces & Prefixes of the new dom implementation of PHP5 I got some (for me!) unexpected results. look at the following source code: (plz copy&paste it to your editor ;) loadXML($xmlCode); $root = $doc->documentElement; print

[PHP] Re: Global vars or Environment var on Class

2004-02-17 Thread Vivian Steller
Turbo wrote: > Hi > > I cann't call Global vars or Environment var on Class.How to's i do to > call it? > I want to call variable same below. > > var $location > ="http://".$HTTP_SERVER_VARS['HTTP_HOST'].$_SERVER['REQUEST_URI']."?" $HTTP_SERVER_VARS['QUERY_STRING']; > > > Thank you. > Turb

[PHP] Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually

2004-02-16 Thread Vivian Steller
Christian Stocker wrote: > ... > Vivian, it's not possible the set the namespace according to the W3C > standard, except with createElementNS(). As Adam said, in PHP 4, there > was the option set_namespace, which isn't ported to PHP5 (yet). > > Maybe we should port that function as well, to allow

[PHP] PHP5: ext/dom - set namespace of node manually

2004-02-15 Thread Vivian Steller
Hello, the following code shows my problem: appendChild($node); $node->setAttribute("xmlns", "http://www.somedomain.de/";); print("Namespace: '" . $node->namespaceURI . "'"); $xmlCode = $doc->saveXML(); print("" . htmlspecialchars($xmlCode) . "");

[PHP] Re: [PHP-QA] php5: read-only variables

2004-02-09 Thread Vivian Steller
Jan Lehnardt wrote: > [...] > * Constants. > > The Zend Engine 2.0 introduces per-class constants. > > Example: > > class Foo { > const constant = 'constant'; > } > > echo 'Foo::constant = ' . Foo::constant . "\n"; > ?> > > Old code that has no user-defined classes or functions > named 'cons

[PHP] php5: read-only variables

2004-02-09 Thread Vivian Steller
hello, talking about php5, i'm missing "read-only" attributes/variables for classes/objects. i.e. this would be very useful for implementing the new DOM Level 3 Interfaces as given in http://www.w3.org/TR/2003 CR-DOM-Level-3-Core-20031107/idl-definitions.html . And I don't think of any reason for

[PHP] getting classname of current class

2004-02-06 Thread Vivian Steller
Hi, i've just another problem concerning classes, inheritance and the '::' Syntax. Take a look at the following example code: __arr("test"); } public function __arr($var) { array_push($this->__arr, $var); }

Re: [PHP] Re: PHP5: __call() implementation EXAMPLE

2004-02-05 Thread Vivian Steller
John W. Holmes wrote: > From: "Vivian Steller" <[EMAIL PROTECTED]> > >> Vivian Steller wrote: >> ... >> >> > class MyClass { >> function __call($method, $params) { >> // $params = Array

[PHP] Re: PHP5: __call() implementation EXAMPLE

2004-02-05 Thread Vivian Steller
Vivian Steller wrote: ... > class MyClass { >function __call($method, $params) { > // $params = Array(mixed var, mixed var, ...); > print("request for " . $method . "()\n"); > > // how to get objects in this stri

[PHP] Re: PHP5: __call() implementation EXAMPLE

2004-02-05 Thread Vivian Steller
Vivian Steller wrote: > Hello, > > as you know there is a new callback function __call($method, $params) in > php5. the __call() method of an object is called, if the method named > $method is not declared in this class. > > i want this function simply call the method

[PHP] PHP5: __call() implementation

2004-02-05 Thread Vivian Steller
Hello, as you know there is a new callback function __call($method, $params) in php5. the __call() method of an object is called, if the method named $method is not declared in this class. i want this function simply call the method of another class with "SomeClass::$method(...)" but i'm getting

[PHP] PHP5: class variables problem / array_push bug

2004-02-05 Thread Vivian Steller
hi at all, i've a very strange problem but i don't know if this a real bug or only my imcompetence?! it is a problem with class variables set by __constructor() function in PHP5... look at this code: __arr = Array(); // uncomment this line for testing $this->__setVar("value set ins

[PHP] PHP5: Problem concerning multiple inheritance / interfaces

2004-02-04 Thread Vivian Steller
Hello at all, ok my problem in a nutshell: i need multiple inheritance! is there a solution to fake this functionallity in php5? i have the following problem: the goal is to implement my own DomXML implementation based on the existing DomNode, DomDocument, Dom... Classes. thus, i implement my cla