Version 38 by Gavin
on Jan 08, 2007 19:28.

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
{code}

Where possible, try to keep your use of exceptions vs. type hinting consistent, and not mix both approaches at the same time in the same method for validating argument types.

h3. Function and Method Usage

h1. Errors and Exceptions

The Zend Framework codebase must be {{E_STRICT}} compliant. This means that all Zend Framework code must never emit PHP errors that would be reported in user scripts having {{error_reporting}} set to {{E_ALL | E_STRICT}}. See http://www.php.net/errorfunc for information on {{E_STRICT}}.
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.}}

See http://www.php.net/errorfunc for information on {{E_STRICT}}.

Zend Framework code should not emit PHP errors, if it is reasonably possible. Instead, throw meaningful exceptions. Zend Framework components have {{Exception}} class derivatives specifically for this purpose: