[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

[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: !ELEMENT Document ANY !ELEMENT CMAES_Model_DbSection ANY !ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED 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 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: !ELEMENT Document ANY !ELEMENT CMAES_Model_DbSection ANY !ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED but it gives the warning when

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

2005-11-18 Thread Erik Franzén
, !DOCTYPE document SYSTEM document.dtd Erik Franzén wrote: The code below lacks the part where the folling DTD attribute is created: !ATTLIST document id ID #IMPLIED How can I create the above DTD attribute in the code below? ?php // Creates an instance of the DOMImplementation class $oDomImp

[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

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

2005-11-18 Thread Erik Franzén
Have tried the following code: ?php // Creates an instance of the DOMImplementation class $oDomImp = new DOMImplementation; // Creates a DOMDocumentType instance $oDomDtd = $oDomImp-createDocumentType('Document', '', 'D:/CMAES/Src/dbtree.dtd'); // Creates a DOMDocument instance $oDom =

[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: !ELEMENT Document ANY !ELEMENT CMAES_Model_DbSection ANY !ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED Here is the code example and result again: ?php // Creates an instance of the DOMImplementation class

[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: !ATTLIST document id ID #IMPLIED How can I create the above DTD attribute in the code below? ?php // Creates an instance of the DOMImplementation class $oDomImp = new DOMImplementation; // Creates a DOMDocumentType

[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

[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,

[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] 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

[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 ?php class RecursiveArrayIterator extends ArrayIterator implements RecursiveIteratorIterator { function hasChildren() { return is_array($this-current()); } function

[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

[PHP] Re: interface problem in PHP5

2004-09-04 Thread Erik Franzén
stdclass; $b = $a; $c = $a; ? 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\CMAES\src

[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

[PHP] destroying objects in an array in PHP5

2004-07-27 Thread Erik Franzén
See the following example: ?PHP $oObjectA = array(); $oObjectB = array(); for(i=0;i10;i++) { $oObjectA[$i] = new foo(); $oObjectB[$i] = $oObjectA[$i]; } ? 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

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

2004-07-27 Thread Erik Franzén
I am correcting myself... ?PHP class foo {} $oObjectA = array(); $oObjectB = array(); for($i=0;$i2;$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) { } }

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: ?PHP class foo {} $a = new foo(); $b = $a; unset($a); var_dump($b); ? This will output: object(foo)#1 (0) { } The object is not destroyed!?

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 not

[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:

[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

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

2002-12-25 Thread Erik Franzén
) 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 Engine. I must have missed it totally! I was

[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

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

2002-12-24 Thread Erik Franzén
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, Erik Franzén wrote: I believed that PHP V4.