예제 #1
0
 /**
  * Constructor
  * 
  * @param mixed           $callable   Callable
  * @param null|string     $definition Name of the current definition (if any)
  * @param null|\Exception $prev       Previous Exception
  * 
  * @return void
  */
 public function __construct($callable, $definition = null, $prev = null)
 {
     if (is_array($callable)) {
         $class = isset($callable[0]) ? $callable[0] : 'undefined';
         $method = isset($callable[1]) ? $callable[1] : 'undefined';
         $txt = sprintf("%s::%s()", is_object($class) ? get_class($class) : (string) $class, is_string($method) ? $method : print_r($method, true));
     } else {
         $txt = (string) $callable;
     }
     parent::__construct("[{$definition}] Callable {$txt} is invalid", null, $prev);
 }
예제 #2
0
 /**
  * Constructor
  * 
  * @param string          $name       Classname of the Definition
  * @param null|string     $definition Name of the current definition (if any)
  * @param null|\Exception $prev       Previous Exception
  * 
  * @return void
  */
 public function __construct($name, $definition = null, \Exception $prev = null)
 {
     parent::__construct("[{$definition}] Class definition '{$name}' is invalid", null, $prev);
 }
예제 #3
0
 /**
  * Constructor
  * 
  * @param string          $name Class name
  * @param null|\Exception $prev Previous Exception
  * 
  * @return void
  */
 public function __construct($name, \Exception $prev = null)
 {
     parent::__construct("Class '{$name}' does not exists", null, $prev);
 }
예제 #4
0
 /**
  * Constructor
  * 
  * @param string          $name       Reference name
  * @param null|string     $definition Name of the current definition (if any)
  * @param null|\Exception $prev       Previous Exception
  * 
  * @return void
  */
 public function __construct($name, $definition = null, \Exception $prev = null)
 {
     parent::__construct("[{$definition}] Reference '{$name}' does not exist", null, $prev);
 }
예제 #5
0
파일: SearchException.php 프로젝트: fwk/di
 /**
  * Constructor
  * 
  * @param string          $name       Reference name
  * @param null|string     $definition Name of the current definition (if any)
  * @param null|\Exception $prev       Previous Exception
  * 
  * @return void
  */
 public function __construct($message, \Exception $prev = null)
 {
     parent::__construct($message, null, $prev);
 }
예제 #6
0
 /**
  * Constructor
  * 
  * @param integer         $index      Idx of the Argument
  * @param null|string     $definition Name of the current definition (if any)
  * @param null|\Exception $prev       Previous Exception
  * 
  * @return void
  */
 public function __construct($index, $definition = null, \Exception $prev = null)
 {
     parent::__construct("[{$definition}] Argument #{$index} is invalid", null, $prev);
 }
예제 #7
0
 /**
  * Constructor
  * 
  * @param string          $name Definition name
  * @param null|\Exception $prev Previous Exception
  * 
  * @return void
  */
 public function __construct($name, \Exception $prev = null)
 {
     parent::__construct("Definition '{$name}' is not registered", null, $prev);
 }