protected function _loadClass($name, $create = false, array $arguments = array())
    {
        if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
            $className = $this->_loader->find($name);
         } else {
            $className = $this->_loader->load($name);
        }

        // \MUtil_Echo::track($className);

        if (is_subclass_of($className, __CLASS__)) {
            $create    = true;
            $arguments = array();

            if (isset($this->_containers[0])) {
                $arguments[] = $this->_containers[0];
            } else {
                $arguments[] = null;
            }

            $arguments[] = $this->_dirs;

            if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
                $arguments[] = $this->_loader;
            }

        } elseif (is_subclass_of($className, 'MUtil_Registry_TargetInterface')) {
            $create = true;
        }

        if (! $create) {
            return new \MUtil_Lazy_StaticCall($className);
        }



        if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
            $mergedArguments = array_merge(['className' => $className], $arguments);
            $obj = call_user_func_array([$this->_loader, 'create'], $mergedArguments);
        } else {
            $obj = $this->_loader->createClass($className, $arguments);
        }

        if ($obj instanceof \MUtil_Registry_TargetInterface) {
            if ((! $this->applySource($obj)) && parent::$verbose) {
                \MUtil_Echo::r("Source apply to object of type $name failed.", __CLASS__ . '->' .  __FUNCTION__);
            }
        }

        return $obj;
    }
protected function _loadClass($name, $create = false, array $arguments = array())
    {
        if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
            $className = $this->_loader->find($name);
         } else {
            $className = $this->_loader->load($name);
        }

        // \MUtil_Echo::track($className);

        if (is_subclass_of($className, __CLASS__)) {
            $create    = true;
            $arguments = array();

            if (isset($this->_containers[0])) {
                $arguments[] = $this->_containers[0];
            } else {
                $arguments[] = null;
            }

            $arguments[] = $this->_dirs;

            if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
                $arguments[] = $this->_loader;
            }

        } elseif (is_subclass_of($className, 'MUtil_Registry_TargetInterface')) {
            $create = true;
        }

        if (! $create) {
            return new \MUtil_Lazy_StaticCall($className);
        }



        if ($this->_loader instanceof Zalt\Loader\ProjectOverloader) {
            $mergedArguments = array_merge(['className' => $className], $arguments);
            $obj = call_user_func_array([$this->_loader, 'create'], $mergedArguments);
        } else {
            $obj = $this->_loader->createClass($className, $arguments);
        }

        if ($obj instanceof \MUtil_Registry_TargetInterface) {
            if ((! $this->applySource($obj)) && parent::$verbose) {
                \MUtil_Echo::r("Source apply to object of type $name failed.", __CLASS__ . '->' .  __FUNCTION__);
            }
        }

        return $obj;
    }
protected function _loadClass ( $ name , $ create = false , array $ arguments = array ( ) ) { if ( $ this -> _loader instanceof Zalt \ Loader \ ProjectOverloader ) { $ className = $ this -> _loader -> find ( $ name ) ; } else { $ className = $ this -> _loader -> load ( $ name ) ; } // \MUtil_Echo::track($className); if ( is_subclass_of ( $ className , __CLASS__ ) ) { $ create = true ; $ arguments = array ( ) ; if ( isset ( $ this -> _containers [ 0 ] ) ) { $ arguments [ ] = $ this -> _containers [ 0 ] ; } else { $ arguments [ ] = null ; } $ arguments [ ] = $ this -> _dirs ; if ( $ this -> _loader instanceof Zalt \ Loader \ ProjectOverloader ) { $ arguments [ ] = $ this -> _loader ; } } elseif ( is_subclass_of ( $ className , 'MUtil_Registry_TargetInterface' ) ) { $ create = true ; } if ( ! $ create ) { return new \ MUtil_Lazy_StaticCall ( $ className ) ; } if ( $ this -> _loader instanceof Zalt \ Loader \ ProjectOverloader ) { $ mergedArguments = array_merge ( [ 'className' => $ className ] , $ arguments ) ; $ obj = call_user_func_array ( [ $ this -> _loader , 'create' ] , $ mergedArguments ) ; } else { $ obj = $ this -> _loader -> createClass ( $ className , $ arguments ) ; } if ( $ obj instanceof \ MUtil_Registry_TargetInterface ) { if ( ( ! $ this -> applySource ( $ obj ) ) && parent :: $ verbose ) { \ MUtil_Echo :: r ( "Source apply to object of type $name failed." , __CLASS__ . '->' . __FUNCTION__ ) ; } } return $ obj ; }
Create or loads the class. When only loading, this function returns a StaticCall object that
can be invoked lazely.

@see \MUtil_Lazy_StaticCall
@see \MUtil_Registry_TargetInterface

@param string $name The class name, minus the part in $this->_dirs.
@param boolean $create Create the object, or only when an \MUtil_Registry_TargetInterface instance.
@param array $arguments Class initialization arguments.
@return mixed A class instance or a \MUtil_Lazy_StaticCall object
Create or loads the class . When only loading this function returns a StaticCall object that can be invoked lazely .