downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Yaf_Application::getModules> <Yaf_Application::getLastErrorMsg
[edit] Last updated: Fri, 07 Jun 2013

view this page in

Yaf_Application::getLastErrorNo

(Yaf >=2.1.2)

Yaf_Application::getLastErrorNoGet code of last occurred error

Açıklama

public int Yaf_Application::getLastErrorNo ( void )

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Örnekler

Örnek 1 Yaf_Application::getLastErrorNo()example

<?php
function error_handler($errno$errstr$errfile$errline) {
   
var_dump(Yaf_Application::app()->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();
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

int(516)
bool(true)


add a note add a note User Contributed Notes Yaf_Application::getLastErrorNo - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites