ZF-8637: Zend_Loader_Autoloader_Interface autoload() - doc missing

Issue Type: Docs: Improvement Created: 2009-12-26T19:39:53.000+0000 Last Updated: 2010-08-28T17:37:51.000+0000 Status: Resolved Fix version(s): - 1.11.1 (30/Nov/10)

Reporter: David Toniolo (david toniolo) Assignee: Wil Moore III (wilmoore) (wilmoore) Tags: - Zend_Loader

Related issues: Attachments: - ZF-8637.patch


phpdoc comment is missing for autoload()-method.

PHPDoc generates "void" returns when @return is missing, but autoload() has to return a boolean.

Here is my recommendation for a phpdoc:

<pre class="highlight">
interface Zend_Loader_Autoloader_Interface
     * Autoload a class
     * @param  string $class 
     * @return mixed true, when $class loaded, ignored to load or other accepted status. false, when class loading failed. Other mixed values, if nescessary.
    public function autoload($class);

In most cases autoload() has to return a boolean, but Zend_Loader_Autoloader_Resource implements this interface and returns a mixed value!


Posted by Wil Moore III (wilmoore) (wilmoore) on 2010-05-21T14:31:38.000+0000

Proposing the attached patch. The updated docblock comments are based on suggestions from the original reporter with some modifications for clarity as well as to fully reflect what is returned upon concrete usage.

Posted by Wil Moore III (wilmoore) (wilmoore) on 2010-05-21T15:25:48.000+0000


Posted by Ramon Henrique Ornelas (ramon) on 2010-08-28T17:37:51.000+0000

Assigned fix version.

Have you found an issue?

See the Overview section for more details.


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

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