ZF-1309: Unable to clone Zend_Pdf_Page

Issue Type: Bug Created: 2007-04-24T05:43:51.000+0000 Last Updated: 2008-01-23T18:42:10.000+0000 Status: Resolved Fix version(s): - 1.0.2 (25/Sep/07)

Reporter: Karol Grecki (antych) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Pdf

Related issues: - ZF-449



This class does not implement __clone() and copying pages fails. There's a hint that page cloning is done via constructor and not is implemented yet:

<pre class="highlight">
        if ($param1 instanceof Zend_Pdf_Page && $param2 === null && $param3 === null) {
            /** @todo implementation */
            throw new Zend_Pdf_Exception('Not implemented yet.');

This missing bit is a serious issue if you try to do proper OOP. IMHO copying object belongs to clone keyword and __clone() method. And if it's meant to be done by the constructor then at least __clone() should throw an exception.


Posted by Thomas Weidner (thomas) on 2007-05-06T09:15:24.000+0000

Assigned to Alexander due to Zend_Pfd relation

Posted by Alexander Veremyev (alexander) on 2007-05-25T02:52:00.000+0000

Postponed to post-1.0 period

Posted by Paul Menheere (paulmenheere) on 2007-08-17T14:55:10.000+0000

Is there any Idea when this is going to be implemented ??

Posted by Alexander Veremyev (alexander) on 2007-08-26T13:51:32.000+0000

I see it's an important feature.

Posted by Alexander Veremyev (alexander) on 2007-08-26T13:52:56.000+0000

I think it should be done as one of the first Zend_Pdf improvements.

Posted by Alexander Veremyev (alexander) on 2007-09-05T07:58:24.000+0000


Cloning mechanism is not used because we need access to the source object (that's of course possible to do this, but it complicates memory management).

Exception is thrown if clone keyword is used.

Posted by Wil Sinclair (wil) on 2008-01-23T18:42:10.000+0000

Updating Fix Version to follow issue tracker conventions.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.