[PHP] Detailed PHP User SPL documentation?

2007-02-24 Thread Erik Franzén
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SPL have been aorund for a while now, and it is a great tool for a php programmer. However, can anyone point me towards more detailed php-documentation about how to use the SPL Classes? I can only find http://www.php.net/~helly/php/ext/spl which is ni

[PHP] Re: DomDocument::GetElementById - a workaround with external DTD

2005-11-19 Thread Erik Franzén
I totally missed that explanation on w3c. Thanxs, now it works /Erik Rob wrote: Erik Franzén wrote: I did a typo in the threads post. The dtd is: but it gives the warning when DomDocument::validate() is called: Warning: Syntax of value for attribute S_iSectionId of

[PHP] Re: DomDocument::GetElementById - a workaround with external DTD

2005-11-19 Thread Erik Franzén
I did a typo in the threads post. The dtd is: but it gives the warning when DomDocument::validate() is called: Warning: Syntax of value for attribute S_iSectionId of CMAES_Model_DbSection is not valid in

[PHP] Sorry, I copied the wrong the DTD in the code:

2005-11-18 Thread Erik Franzén
Sorry, I copied the wrong DTD into the post. The DTD is the following: Here is the code example and result again: $oDomDtd = $oDomImp->createDocumentType('Document', '', 'D:/CMAES/Src/dbtree.dtd'); // Creates a DOMDocument instance $oDom = $oDomImp->createDocument("", "Document", $oDomDt

[PHP] DomDocument::GetElementById - a workaround with external DTD

2005-11-18 Thread Erik Franzén
Have tried the following code: $oDomDtd = $oDomImp->createDocumentType('Document', '', 'D:/CMAES/Src/dbtree.dtd'); // Creates a DOMDocument instance $oDom = $oDomImp->createDocument("", "Document", $oDomDtd); // Set other properties $oDom->encoding = 'iso-8859-1'; $oElement = $oDom->createEl

[PHP] Re: How to build a XML DTD on "the fly"?

2005-11-18 Thread Erik Franzén
My real problem is that I am building a XML tree and I want to use the getElementbyId method on the tree directly. It would be very nice if it is possible to do it without including a external dtd, since it takes some time to load every time. The page http://blog.bitflux.ch/wiki/GetElementByI

[PHP] Re: How to build a XML DTD on "the fly"?

2005-11-18 Thread Erik Franzén
apparently, that is not the case. /Erik James Benson wrote: Learn DTD and how it works first then you will know :-) A DTD is contained in an external file and not in XML, so you would create a DTD file then link it from the XML like so, Erik Franzén wrote: The code below lacks the part

[PHP] How to build a XML DTD on "the fly"?

2005-11-16 Thread Erik Franzén
The code below lacks the part where the folling DTD attribute is created: How can I create the above DTD attribute in the code below? createDocumentType('document', null, null); // Creates a DOMDocument instance $oDom = $oDomImp->createDocument("", "", $oDomDtd); // Set other properties $oDo

[PHP] Re: Easiest way to user DomDocument->getElementById()?

2005-11-14 Thread Erik Franzén
I have run into this behavior on several sites: $dom->validate('books.dtd'); But according to the docs, the method it is defined class DOMDocument { bool validate ( void ) } Is the dtd (file?) parameter deprecated? /Erik Just tested, $dom->validate('books.dtd') generates the warning "

[PHP] Re: Easiest way to user DomDocument->getElementById()?

2005-11-14 Thread Erik Franzén
I have run into this behavior on several sites: $dom->validate('books.dtd'); But according to the docs, the method it is defined class DOMDocument { bool validate ( void ) } Is the dtd (file?) parameter deprecated? /Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Easiest way to user DomDocument->getElementById()?

2005-11-14 Thread Erik Franzén
According to the php docs, the method DomDocument->getElementById() will not work unless the document is validated using a DTD (not schema): "According to the DOM standard this requires a DTD which defines the attribute ID to be of type ID. You need to validate your document with DOMDocument->

[PHP] Re: RecursiveIteratorIterator för PHP 5.0 .5 Win32

2005-10-01 Thread Erik Franzén
Of course you are right. I was fooled by this page: http://www.wiki.cc/php/RecursiveIterator class RecursiveArrayIterator extends ArrayIterator implements RecursiveIteratorIterator { function hasChildren() { return is_array($this->current()); } function getChildren()

[PHP] RecursiveIteratorIterator för PHP 5.0.5 Win32

2005-10-01 Thread Erik Franzén
I have the following class class CMAES_DomIterator implements RecursiveIteratorIterator { } When I am instanciating the class I am getting the following error: Fatal error: CMAES_DomIterator cannot implement RecursiveIteratorIterator - it is not an interface ... Does not PHP 5.0.5 suppo

[PHP] Re: interface problem in PHP5

2004-09-04 Thread Erik Franzén
ling example unsetting a will only kill a, b and c will still be "alive". setting a to null will kill c but not b /Erik Torsten Roehr wrote: "Erik franzén" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Can anuyone describe this error? Compile Error: E:\Source

[PHP] interface problem in PHP5

2004-09-04 Thread Erik Franzén
Can anuyone describe this error? Compile Error: E:\Source\CMAES\src\include\dom.inc.php line 67 - Declaration of CMAES_DOM_Node_List::item() must be compatible with that of CMAES_DOM_Node_List_Interface::item() // {{{ interface CMAES_DOM_Node_List /** * * @access public */ interface CMAES_DO

[PHP] Determine if a property in a class is public, protected or private in PHP 5?

2004-08-25 Thread Erik Franzén
Is it possible to determine if a property inside a object is public, protected or private in PHP 5? /Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: destroying objects in an array in PHP5

2004-07-27 Thread Erik Franzén
Thanxs for the help Curt!! Thats a tricky solution, but it works... This is almost motivating a new method in PHP5: $foo->__destroy() which will destroy the object once and for all... :) /Erik Curt Zirzow wrote: * Thus wrote Erik Franzn: $oObjectB[$i] = &$oObjectA[$i]; The above statement does no

Re: [PHP] Re: destroying objects in an array in PHP5

2004-07-27 Thread Erik Franzén
$oObjectB[$i] = &$oObjectA[$i]; The above statement does not matter, because in PHP5 "objects are referenced by handle, and not by value". Look at this example: $a = new foo(); $b = $a; unset($a); var_dump($b); >? This will output: object(foo)#1 (0) { } The object is not destroyed!? How do I destr

[PHP] Re: destroying objects in an array in PHP5

2004-07-27 Thread Erik Franzén
I am correcting myself... $oObjectA = array(); $oObjectB = array(); for($i=0;$i<2;$i++) { $oObjectA[$i] = new foo(); $oObjectB[$i] = $oObjectA[$i]; } unset($oObjectA[1]); var_dump($oObjectA); var_dump($oObjectB); ?> will output: array(1) { [0]=> object(foo)#1 (0) { } } array(2) { [0]

[PHP] destroying objects in an array in PHP5

2004-07-27 Thread Erik Franzén
See the following example: How do I remove an element in the oObjectA array without destroying the object? I do not want to clone any object. If I call unset($oObjectA[3]), the object will also be destroyed. apparently $oObjectB[3] is also destroyed? /Erik -- PHP General Mailing List (http://w

[PHP] What is the PHP5 eqvivalent to domxml_open_mem in PHP4?

2004-07-26 Thread Erik Franzén
The docs for PHP5 and dom xml is not written yet, so I tried to find information about load and save methods on the w3c site, but I didn't find anything. What's is the PHP5 eqvivalent to domxml_open_mem in PHP4? /Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] OOP and object references, not copies - how to do?

2002-12-26 Thread Erik Franzén
Say the you are going to create a simple forum and you want to have a number of classes: Class Sql - handles the DB interface Class User - handles users Class Messages - handles messages When you are writing the code, you first creates a new sql object in order to read or write data from or to th

Re: [PHP] What happened with zend engine version 2?

2002-12-25 Thread Erik Franzén
s about (for an example) private members? "Erik FranzéN" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > After I posted the first message, I read something about PHP 5 at > www.zend.com and suspected that is was about the new Zend E

Re: [PHP] What happened with zend engine version 2?

2002-12-24 Thread Erik Franzén
x27;m longing for it... :) "Rasmus Lerdorf" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That was never the plan. It is scheduled for PHP 5 sometime in the next > 6-12 months. > > -Rasmus > > On Tue, 24 Dec 2002

[PHP] What happened with zend engine version 2?

2002-12-24 Thread Erik Franzén
I believed that PHP V4.3 should include the Zend engine version 2 since there was two alpha releases for PHP-4.3.0 with Zend engine version 2 -PHP-4.3.0-dev-zend2-win32-alpha1 -PHP-4.3.0-dev-zend2-win32-alpha2 I'm waiting for Zend engine version 2. Where could I read information about future rel