Ejemplo n.º 1
0
 public function getObjectInstance()
 {
     if (empty($this->instance)) {
         $instance = parent::getObjectInstance();
         $this->instance = $instance;
     }
     return $this->instance;
 }
Ejemplo n.º 2
0
 /**
  * Sets a class instance constructor with optional arguments.
  *
  * @param $alias
  * @param $class_and_method
  * @param null $arg_one One or more optional arguments that should be passed to the class constructor.
  *
  * @return bool|tad_DI52_Ctor Either a new constructor instance or `false` if the constructor alias
  */
 public function setCtor($alias, $class_and_method, $arg_one = null)
 {
     $func_args = func_get_args();
     $args = array_splice($func_args, 2);
     return $this->ctors[$alias] = tad_DI52_Ctor::create($class_and_method, $args, $this);
 }