Константи, описані нижче — визначені цим розширенням, тож доступні, коли розширення скомпільовано як частина PHP або динамічно підключене під час виконання.
When an error occurs during startup, routing, dispatching or
autoloading, Yaf either throws a subclass of
Yaf_Exception whose exception code is one of the
YAF_ERR_* constants, or triggers a PHP error of the
corresponding type — see
Yaf_Dispatcher::throwException() and
Yaf_Application::getLastErrorNo().
YAF_VERSION
(string)
The version of the loaded Yaf extension, e.g.
"3.3.8".
YAF_ENVIRON
(string)
The value of the
yaf.environ
directive at the time the extension was started, used by
Yaf_Application to select the configuration
section. Defaults to "product".
YAF_ERR_STARTUP_FAILED
(int)
Startup failure, value 512. Thrown as a
Yaf_Exception_StartupError when
Yaf_Application could not be started, e.g. the
application directory is missing or the configuration is invalid.
YAF_ERR_ROUTE_FAILED
(int)
Routing failure, value 513. Thrown as a
Yaf_Exception_RouterFailed when no route was
able to route the request.
YAF_ERR_DISPATCH_FAILED
(int)
Dispatch failure, value 514. Thrown as a
Yaf_Exception_DispatchFailed when the request
could not be dispatched, e.g. when the
yaf.forward_limit is
exceeded.
YAF_ERR_NOTFOUND_MODULE
(int)
The module could not be found, value 515. Thrown
as a Yaf_Exception_LoadFailed_Module.
YAF_ERR_NOTFOUND_CONTROLLER
(int)
The controller could not be found, value 516.
Thrown as a
Yaf_Exception_LoadFailed_Controller.
YAF_ERR_NOTFOUND_ACTION
(int)
The action could not be found, value 517. Thrown
as a Yaf_Exception_LoadFailed_Action.
YAF_ERR_NOTFOUND_VIEW
(int)
The view script could not be found, value 518.
Thrown as a Yaf_Exception_LoadFailed_View.
YAF_ERR_CALL_FAILED
(int)
Calling a method failed, value 519. Used when an
action method or another callable could not be invoked.
YAF_ERR_AUTOLOAD_FAILED
(int)
Autoloading failed, value 520. Triggered by
Yaf_Loader when the file for a class cannot
be loaded, e.g. the resolved path is too long.
YAF_ERR_TYPE_ERROR
(int)
A type error occurred, value 521. Thrown as a
Yaf_Exception_TypeError when an argument or a
class definition has an unexpected type, e.g. a controller that is
not a class extending
Yaf_Controller_Abstract.
YAF_ERR_ACCESS_ERROR
(int)
Access is not allowed, value 522. Used, for
example, when attempting to call an action method that is not
public.
(Available since Yaf 3.2.0.)