diff --git a/reference/yaf/examples.xml b/reference/yaf/examples.xml
index eff30f65d0..d799dd1adb 100644
--- a/reference/yaf/examples.xml
+++ b/reference/yaf/examples.xml
@@ -4,23 +4,136 @@
&reftitle.examples;
- Yaf Example
-
-
-]]>
-
- &example.outputs.similar;
+ A classic Application directory layout
+
+
+
+ Entry
+ index.php in the top directory is the only way in of the application, you should rewrite all request to it(you can use .htaccess in Apache+php_mod)
+
+bootstrap() //call bootstrap methods defined in Bootstrap.php
+ ->run();
+]]>
+
+
+
+
+ Rewrite rule
+
+ "/index.php/$1",
+ )
+}
]]>
+
+
+ Application config
+
+
+
+
+
+
+ Default controller
+
+view->word = "hello world";
+ }
+}
+?>
+]]>
+
+
+
+
+ Default view template
+
+
+
+ Hello World
+
+
+
+
+
+]]>
+
+
+
+
+ Run the Applicatioin
+ &example.outputs.similar;
+
+
+
+ Hello World
+
+
+ hello world
+
+
+]]>
+
+
+
+
+
+ Yaf_Application::clearLastError
+ Clear the last error info
+
+
+
+ &reftitle.description;
+
+ public Yaf_ApplicationYaf_Application::clearLastError
+
+
+
+
+
+
+ &warn.undocumented.func;
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Yaf_Application::clearLastErrorexample
+
+clearLastError();
+ var_dump(Yaf_Application::app()->getLastErrorNo());
+}
+
+$config = array(
+ "application" => array(
+ "directory" => "/tmp/notexists",
+ "dispatcher" => array(
+ "throwException" => 0, //trigger error instead of throw exception when error occure
+ ),
+ ),
+);
+
+$app = new Yaf_Application($config);
+$app->getDispatcher()->setErrorHandler("error_handler", E_RECOVERABLE_ERROR);
+$app->run();
+?>
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+
diff --git a/reference/yaf/yaf_application/environ.xml b/reference/yaf/yaf_application/environ.xml
index 93fa754980..76f145d24b 100644
--- a/reference/yaf/yaf_application/environ.xml
+++ b/reference/yaf/yaf_application/environ.xml
@@ -4,7 +4,7 @@
Yaf_Application::environ
- retrive environ
+ Retrive environ
diff --git a/reference/yaf/yaf_application/execute.xml b/reference/yaf/yaf_application/execute.xml
index a8cec71754..b4ea5959ae 100644
--- a/reference/yaf/yaf_application/execute.xml
+++ b/reference/yaf/yaf_application/execute.xml
@@ -4,7 +4,7 @@
Yaf_Application::execute
- execute a callback
+ Execute a callback
diff --git a/reference/yaf/yaf_application/getconfig.xml b/reference/yaf/yaf_application/getconfig.xml
index addf34cb8b..0cb30be824 100644
--- a/reference/yaf/yaf_application/getconfig.xml
+++ b/reference/yaf/yaf_application/getconfig.xml
@@ -4,7 +4,7 @@
Yaf_Application::getConfig
- retrive the config instance
+ Retrive the config instance
diff --git a/reference/yaf/yaf_application/getdispatcher.xml b/reference/yaf/yaf_application/getdispatcher.xml
index c3c8423e81..9a0741dc9f 100644
--- a/reference/yaf/yaf_application/getdispatcher.xml
+++ b/reference/yaf/yaf_application/getdispatcher.xml
@@ -4,7 +4,7 @@
Yaf_Application::getDispatcher
- get Yaf_Dispatcher instance
+ Get Yaf_Dispatcher instance
diff --git a/reference/yaf/yaf_application/getlasterrormsg.xml b/reference/yaf/yaf_application/getlasterrormsg.xml
new file mode 100644
index 0000000000..d9a7b648bf
--- /dev/null
+++ b/reference/yaf/yaf_application/getlasterrormsg.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+ Yaf_Application::getLastErrorMsg
+ Get message of the last occurred error
+
+
+
+ &reftitle.description;
+
+ public stringYaf_Application::getLastErrorMsg
+
+
+
+
+
+
+ &warn.undocumented.func;
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Yaf_Application::getLastErrorMsgexample
+
+getLastErrorMsg());
+}
+
+$config = array(
+ "application" => array(
+ "directory" => "/tmp/notexists",
+ "dispatcher" => array(
+ "throwException" => 0, //trigger error instead of throw exception when error occure
+ ),
+ ),
+);
+
+$app = new Yaf_Application($config);
+$app->getDispatcher()->setErrorHandler("error_handler", E_RECOVERABLE_ERROR);
+$app->run();
+?>
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+
diff --git a/reference/yaf/yaf_application/getlasterrorno.xml b/reference/yaf/yaf_application/getlasterrorno.xml
new file mode 100644
index 0000000000..0ceabe44fc
--- /dev/null
+++ b/reference/yaf/yaf_application/getlasterrorno.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+ Yaf_Application::getLastErrorNo
+ Get code of last occurred error
+
+
+
+ &reftitle.description;
+
+ public intYaf_Application::getLastErrorNo
+
+
+
+
+
+
+ &warn.undocumented.func;
+
+
+
+
+ &reftitle.parameters;
+ &no.function.parameters;
+
+
+
+ &reftitle.returnvalues;
+
+
+
+
+
+ &reftitle.examples;
+
+ Yaf_Application::getLastErrorNoexample
+
+getLastErrorNo());
+ var_dump(Yaf_Application::app()->getLastErrorNo() == YAF_ERR_NOTFOUND_CONTROLLER);
+}
+
+$config = array(
+ "application" => array(
+ "directory" => "/tmp/notexists",
+ "dispatcher" => array(
+ "throwException" => 0, //trigger error instead of throw exception when error occure
+ ),
+ ),
+);
+
+$app = new Yaf_Application($config);
+$app->getDispatcher()->setErrorHandler("error_handler", E_RECOVERABLE_ERROR);
+$app->run();
+]]>
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/yaf/yaf_application/getmodules.xml b/reference/yaf/yaf_application/getmodules.xml
index 3c6f742dba..60552bcd28 100644
--- a/reference/yaf/yaf_application/getmodules.xml
+++ b/reference/yaf/yaf_application/getmodules.xml
@@ -4,7 +4,7 @@
Yaf_Application::getModules
- get defined module names
+ Get defined module names
diff --git a/reference/yaf/yaf_application/run.xml b/reference/yaf/yaf_application/run.xml
index 13dfc7098c..b90e499f5c 100644
--- a/reference/yaf/yaf_application/run.xml
+++ b/reference/yaf/yaf_application/run.xml
@@ -4,7 +4,7 @@
Yaf_Application::run
- start Yaf_Application
+ Start Yaf_Application
diff --git a/reference/yaf/yaf_dispatcher/autorender.xml b/reference/yaf/yaf_dispatcher/autorender.xml
index 3e9dcd9286..12ee5832ca 100644
--- a/reference/yaf/yaf_dispatcher/autorender.xml
+++ b/reference/yaf/yaf_dispatcher/autorender.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::autoRender
- The autoRender purpose
+ Switch on/off autorendering
&reftitle.description;
- public voidYaf_Dispatcher::autoRender
- stringflag
+ public Yaf_DispatcherYaf_Dispatcher::autoRender
+ boolflag
diff --git a/reference/yaf/yaf_dispatcher/catchexception.xml b/reference/yaf/yaf_dispatcher/catchexception.xml
index f1c50c3afb..deea10bee3 100644
--- a/reference/yaf/yaf_dispatcher/catchexception.xml
+++ b/reference/yaf/yaf_dispatcher/catchexception.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::catchException
- The catchException purpose
+ Switch on/off exception catching
&reftitle.description;
- public voidYaf_Dispatcher::catchException
- stringflag
+ public Yaf_DispatcherYaf_Dispatcher::catchException
+ boolflag
diff --git a/reference/yaf/yaf_dispatcher/clone.xml b/reference/yaf/yaf_dispatcher/clone.xml
index 94eafb08b0..cacfd5fb58 100644
--- a/reference/yaf/yaf_dispatcher/clone.xml
+++ b/reference/yaf/yaf_dispatcher/clone.xml
@@ -4,7 +4,7 @@
Yaf_Dispatcher::__clone
- The __clone purpose
+ Yaf_Dispatcher can not be cloned
diff --git a/reference/yaf/yaf_dispatcher/construct.xml b/reference/yaf/yaf_dispatcher/construct.xml
index 5bcfde4eb6..fa585c4163 100644
--- a/reference/yaf/yaf_dispatcher/construct.xml
+++ b/reference/yaf/yaf_dispatcher/construct.xml
@@ -4,7 +4,7 @@
Yaf_Dispatcher::__construct
- The __construct purpose
+ Yaf_Dispatcher constructor
diff --git a/reference/yaf/yaf_dispatcher/disableview.xml b/reference/yaf/yaf_dispatcher/disableview.xml
index 3cd7bff337..1f50e8548c 100644
--- a/reference/yaf/yaf_dispatcher/disableview.xml
+++ b/reference/yaf/yaf_dispatcher/disableview.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::disableView
- The disableView purpose
+ Disable view rendering
&reftitle.description;
- public voidYaf_Dispatcher::disableView
+ public Yaf_DispatcherYaf_Dispatcher::disableView
diff --git a/reference/yaf/yaf_dispatcher/dispatch.xml b/reference/yaf/yaf_dispatcher/dispatch.xml
index 1e776f62a4..33784e9571 100644
--- a/reference/yaf/yaf_dispatcher/dispatch.xml
+++ b/reference/yaf/yaf_dispatcher/dispatch.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::dispatch
- The dispatch purpose
+ Dispatch a request
&reftitle.description;
- public voidYaf_Dispatcher::dispatch
- stringrequest
+ public Yaf_Response_AbstractYaf_Dispatcher::dispatch
+ Yaf_Request_Abstractrequest
diff --git a/reference/yaf/yaf_dispatcher/enableview.xml b/reference/yaf/yaf_dispatcher/enableview.xml
index 579eb31668..a283a13f03 100644
--- a/reference/yaf/yaf_dispatcher/enableview.xml
+++ b/reference/yaf/yaf_dispatcher/enableview.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::enableView
- The enableView purpose
+ enable view rendering
&reftitle.description;
- public voidYaf_Dispatcher::enableView
+ public Yaf_DispatcherYaf_Dispatcher::enableView
diff --git a/reference/yaf/yaf_dispatcher/flushinstantly.xml b/reference/yaf/yaf_dispatcher/flushinstantly.xml
index 1033221143..372e878cc3 100644
--- a/reference/yaf/yaf_dispatcher/flushinstantly.xml
+++ b/reference/yaf/yaf_dispatcher/flushinstantly.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::flushInstantly
- The flushInstantly purpose
+ Switch on/off the instant flushing
&reftitle.description;
- public voidYaf_Dispatcher::flushInstantly
- stringflag
+ public Yaf_DispatcherYaf_Dispatcher::flushInstantly
+ boolflag
diff --git a/reference/yaf/yaf_dispatcher/getapplication.xml b/reference/yaf/yaf_dispatcher/getapplication.xml
index 7be2800359..d021a59148 100644
--- a/reference/yaf/yaf_dispatcher/getapplication.xml
+++ b/reference/yaf/yaf_dispatcher/getapplication.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::getApplication
- The getApplication purpose
+ Retrive the application
&reftitle.description;
- public voidYaf_Dispatcher::getApplication
+ public Yaf_ApplicationYaf_Dispatcher::getApplication
diff --git a/reference/yaf/yaf_dispatcher/getinstance.xml b/reference/yaf/yaf_dispatcher/getinstance.xml
index 686d094fce..0dfeeba53d 100644
--- a/reference/yaf/yaf_dispatcher/getinstance.xml
+++ b/reference/yaf/yaf_dispatcher/getinstance.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::getInstance
- The getInstance purpose
+ Retrive the dispatcher instance
&reftitle.description;
- public static voidYaf_Dispatcher::getInstance
+ public static Yaf_DispatcherYaf_Dispatcher::getInstance
diff --git a/reference/yaf/yaf_dispatcher/getrequest.xml b/reference/yaf/yaf_dispatcher/getrequest.xml
index e97778c3c7..43df3d77b2 100644
--- a/reference/yaf/yaf_dispatcher/getrequest.xml
+++ b/reference/yaf/yaf_dispatcher/getrequest.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::getRequest
- The getRequest purpose
+ Retrive the request instance
&reftitle.description;
- public voidYaf_Dispatcher::getRequest
+ public Yaf_Request_AbstractYaf_Dispatcher::getRequest
diff --git a/reference/yaf/yaf_dispatcher/getrouter.xml b/reference/yaf/yaf_dispatcher/getrouter.xml
index 2da7f08e10..11f6f558b7 100644
--- a/reference/yaf/yaf_dispatcher/getrouter.xml
+++ b/reference/yaf/yaf_dispatcher/getrouter.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::getRouter
- The getRouter purpose
+ Retrive router instance
&reftitle.description;
- public voidYaf_Dispatcher::getRouter
+ public Yaf_RouterYaf_Dispatcher::getRouter
diff --git a/reference/yaf/yaf_dispatcher/initview.xml b/reference/yaf/yaf_dispatcher/initview.xml
index 2983172561..7d5b3b0b7d 100644
--- a/reference/yaf/yaf_dispatcher/initview.xml
+++ b/reference/yaf/yaf_dispatcher/initview.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::initView
- The initView purpose
+ Initialize view and return it
&reftitle.description;
- public voidYaf_Dispatcher::initView
+ public Yaf_View_InterfaceYaf_Dispatcher::initView
stringtemplates_dir
arrayoptions
diff --git a/reference/yaf/yaf_dispatcher/registerplugin.xml b/reference/yaf/yaf_dispatcher/registerplugin.xml
index 133fb8448b..0dc04dd41f 100644
--- a/reference/yaf/yaf_dispatcher/registerplugin.xml
+++ b/reference/yaf/yaf_dispatcher/registerplugin.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::registerPlugin
- The registerPlugin purpose
+ Register a plugin
&reftitle.description;
- public voidYaf_Dispatcher::registerPlugin
- stringplugin
+ public Yaf_DispatcherYaf_Dispatcher::registerPlugin
+ Yaf_Plugin_Abstractplugin
diff --git a/reference/yaf/yaf_dispatcher/returnresponse.xml b/reference/yaf/yaf_dispatcher/returnresponse.xml
index 8d43430a51..2d155cfe41 100644
--- a/reference/yaf/yaf_dispatcher/returnresponse.xml
+++ b/reference/yaf/yaf_dispatcher/returnresponse.xml
@@ -10,8 +10,8 @@
&reftitle.description;
- public voidYaf_Dispatcher::returnResponse
- stringflag
+ public Yaf_DispatcherYaf_Dispatcher::returnResponse
+ boolflag
diff --git a/reference/yaf/yaf_dispatcher/setappdirectory.xml b/reference/yaf/yaf_dispatcher/setappdirectory.xml
index a8aca70ca9..54f1b76900 100644
--- a/reference/yaf/yaf_dispatcher/setappdirectory.xml
+++ b/reference/yaf/yaf_dispatcher/setappdirectory.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::setAppDirectory
- The setAppDirectory purpose
+ Change the application directory
&reftitle.description;
- public voidYaf_Dispatcher::setAppDirectory
+ public Yaf_DispatcherYaf_Dispatcher::setAppDirectory
stringdirectory
diff --git a/reference/yaf/yaf_dispatcher/setdefaultaction.xml b/reference/yaf/yaf_dispatcher/setdefaultaction.xml
index e1c532790a..06526effd3 100644
--- a/reference/yaf/yaf_dispatcher/setdefaultaction.xml
+++ b/reference/yaf/yaf_dispatcher/setdefaultaction.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::setDefaultAction
- The setDefaultAction purpose
+ Change default action name
&reftitle.description;
- public voidYaf_Dispatcher::setDefaultAction
+ public Yaf_DispatcherYaf_Dispatcher::setDefaultAction
stringaction
diff --git a/reference/yaf/yaf_dispatcher/setdefaultcontroller.xml b/reference/yaf/yaf_dispatcher/setdefaultcontroller.xml
index 8a92d92e91..772d9a5ecf 100644
--- a/reference/yaf/yaf_dispatcher/setdefaultcontroller.xml
+++ b/reference/yaf/yaf_dispatcher/setdefaultcontroller.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::setDefaultController
- The setDefaultController purpose
+ Change default controller name
&reftitle.description;
- public voidYaf_Dispatcher::setDefaultController
+ public Yaf_DispatcherYaf_Dispatcher::setDefaultController
stringcontroller
diff --git a/reference/yaf/yaf_dispatcher/setdefaultmodule.xml b/reference/yaf/yaf_dispatcher/setdefaultmodule.xml
index 7a24b70b03..188bcd3793 100644
--- a/reference/yaf/yaf_dispatcher/setdefaultmodule.xml
+++ b/reference/yaf/yaf_dispatcher/setdefaultmodule.xml
@@ -4,13 +4,13 @@
Yaf_Dispatcher::setDefaultModule
- The setDefaultModule purpose
+ Change default module name
&reftitle.description;
- public voidYaf_Dispatcher::setDefaultModule
+ public Yaf_DispatcherYaf_Dispatcher::setDefaultModule
stringmodule
diff --git a/reference/yaf/yaf_dispatcher/seterrorhandler.xml b/reference/yaf/yaf_dispatcher/seterrorhandler.xml
index ed226aeab7..c2e4837f5e 100644
--- a/reference/yaf/yaf_dispatcher/seterrorhandler.xml
+++ b/reference/yaf/yaf_dispatcher/seterrorhandler.xml
@@ -10,9 +10,9 @@
&reftitle.description;
- public voidYaf_Dispatcher::setErrorHandler
- stringcallback
- stringerror_types
+ public Yaf_DispatcherYaf_Dispatcher::setErrorHandler
+ callcallback
+ interror_types
diff --git a/reference/yaf/yaf_dispatcher/setrequest.xml b/reference/yaf/yaf_dispatcher/setrequest.xml
index de8055d8f2..2804bcd14e 100644
--- a/reference/yaf/yaf_dispatcher/setrequest.xml
+++ b/reference/yaf/yaf_dispatcher/setrequest.xml
@@ -10,8 +10,8 @@
&reftitle.description;
- public voidYaf_Dispatcher::setRequest
- stringplugin
+ public Yaf_DispatcherYaf_Dispatcher::setRequest
+ Yaf_Request_Abstractrequest
diff --git a/reference/yaf/yaf_dispatcher/setview.xml b/reference/yaf/yaf_dispatcher/setview.xml
index 618f24b292..0a1c7c4dbc 100644
--- a/reference/yaf/yaf_dispatcher/setview.xml
+++ b/reference/yaf/yaf_dispatcher/setview.xml
@@ -10,8 +10,8 @@
&reftitle.description;
- public voidYaf_Dispatcher::setView
- stringview
+ public Yaf_DispatcherYaf_Dispatcher::setView
+ Yaf_View_Interfaceview
diff --git a/reference/yaf/yaf_dispatcher/throwexception.xml b/reference/yaf/yaf_dispatcher/throwexception.xml
index 84f61f7e9b..7837c6689e 100644
--- a/reference/yaf/yaf_dispatcher/throwexception.xml
+++ b/reference/yaf/yaf_dispatcher/throwexception.xml
@@ -4,14 +4,14 @@
Yaf_Dispatcher::throwException
- The throwException purpose
+ Switch on/off exception throwing
&reftitle.description;
- public voidYaf_Dispatcher::throwException
- stringflag
+ public Yaf_DispatcherYaf_Dispatcher::throwException
+ boolflag