PHP Coding Standards (5) – Errors and Exceptions

1. The Zend Framework codebase must be E_STRICT compliant. Zend Framework code should not emit PHP warning (E_WARNING, E_USER_WARNING), notice (E_NOTICE, E_USER_NOTICE), or strict (E_STRICT) messages when error_reporting is set to E_ALL | E_STRICT .   That is to say, there are no errors in code writing. Only logic fault will shut down the application. […]

Posted in Coding Standards | Tagged , | Leave a comment

Registry Pattern in Zend Framework

The registry has provided a mechanism which help you to store and maintain your objects within the application. It’s aim at preventing improperly using the global objects by users.   The registry usually provide the functions which makes you really comfortable to manage the objects such as storing, fetching, deleting and so on.   Now let’s take a look at how […]

Posted in Design Patterns | Tagged , | Leave a comment

PHP Coding Standards (4) – Inline Documentation

1. Docblocks start always with "/*" or "/**". The use of "#" is not allowed. The "//" is only allowed for comments within functions.   For example :         2. A docblock must contain a short description and minimum one parameter. Optionally a long description and multiple parameters can be added.   […]

Posted in Coding Standards | Tagged , | 1 Comment