public function load($name, array $params = array(), $object_loader = null, $force_overload = false)
    {
        $config = $this->get('config')->get($name, \CarteBlanche\App\Config::NOT_FOUND_GRACEFULLY, array());
        $factory = \Library\Factory::create()
            ->factoryName(__CLASS__)
            ->mustImplement(Kernel::DEPENDENCY_LOADER_INTERFACE)
            ->defaultNamespace(array(
                Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE,
                Kernel::CARTE_BLANCHE_NAMESPACE.Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE
            ))
            ->classNameMask(array('%s', '%s'.Kernel::DEPENDENCY_LOADER_SUFFIX))
            ->callMethod('load')
            ;
        if (!isset($params['config'])) {
            $params['config'] = $config;
        }
        if (!isset($params['options'])) {
            $params['options'] = $config;
        }
        if (!isset($params['container'])) {
            $params['container'] = $this;
        }
        $object = $factory->build(empty($object_loader) ? $name : $object_loader, $params);

/*
        if (empty($object_loader)) {
            $object_loader = Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE
                .ucfirst(TextHelper::toCamelCase($name));
            if (!class_exists($object_loader)) {
                $object_loader .= Kernel::DEPENDENCY_LOADER_SUFFIX;
            }
        }
        if (!class_exists($object_loader)) {
            throw new \RuntimeException(
                sprintf('Unknown dependency loader for reference "%s"!', $name)
            );
        } elseif (!CodeHelper::impelementsInterface($object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)) {
            throw new \DomainException(
                sprintf('Dependency loader "%s" doesn\'t implement the "%s" interface!',
                    $object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)
            );
        }
        $loader = new $object_loader;
        $config = $this->get('config')->get($name, \CarteBlanche\App\Config::NOT_FOUND_GRACEFULLY, array());
        $object = $loader->load($config, $this);
*/
        return $this->set($name, $object, $force_overload);
    }
public function load($name, array $params = array(), $object_loader = null, $force_overload = false)
    {
        $config = $this->get('config')->get($name, \CarteBlanche\App\Config::NOT_FOUND_GRACEFULLY, array());
        $factory = \Library\Factory::create()
            ->factoryName(__CLASS__)
            ->mustImplement(Kernel::DEPENDENCY_LOADER_INTERFACE)
            ->defaultNamespace(array(
                Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE,
                Kernel::CARTE_BLANCHE_NAMESPACE.Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE
            ))
            ->classNameMask(array('%s', '%s'.Kernel::DEPENDENCY_LOADER_SUFFIX))
            ->callMethod('load')
            ;
        if (!isset($params['config'])) {
            $params['config'] = $config;
        }
        if (!isset($params['options'])) {
            $params['options'] = $config;
        }
        if (!isset($params['container'])) {
            $params['container'] = $this;
        }
        $object = $factory->build(empty($object_loader) ? $name : $object_loader, $params);

/*
        if (empty($object_loader)) {
            $object_loader = Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE
                .ucfirst(TextHelper::toCamelCase($name));
            if (!class_exists($object_loader)) {
                $object_loader .= Kernel::DEPENDENCY_LOADER_SUFFIX;
            }
        }
        if (!class_exists($object_loader)) {
            throw new \RuntimeException(
                sprintf('Unknown dependency loader for reference "%s"!', $name)
            );
        } elseif (!CodeHelper::impelementsInterface($object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)) {
            throw new \DomainException(
                sprintf('Dependency loader "%s" doesn\'t implement the "%s" interface!',
                    $object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)
            );
        }
        $loader = new $object_loader;
        $config = $this->get('config')->get($name, \CarteBlanche\App\Config::NOT_FOUND_GRACEFULLY, array());
        $object = $loader->load($config, $this);
*/
        return $this->set($name, $object, $force_overload);
    }
public function load ( $ name , array $ params = array ( ) , $ object_loader = null , $ force_overload = false ) { $ config = $ this -> get ( 'config' ) -> get ( $ name , \ CarteBlanche \ App \ Config :: NOT_FOUND_GRACEFULLY , array ( ) ) ; $ factory = \ Library \ Factory :: create ( ) -> factoryName ( __CLASS__ ) -> mustImplement ( Kernel :: DEPENDENCY_LOADER_INTERFACE ) -> defaultNamespace ( array ( Kernel :: DEPENDENCY_LOADER_DEFAULT_NAMESPACE , Kernel :: CARTE_BLANCHE_NAMESPACE . Kernel :: DEPENDENCY_LOADER_DEFAULT_NAMESPACE ) ) -> classNameMask ( array ( '%s' , '%s' . Kernel :: DEPENDENCY_LOADER_SUFFIX ) ) -> callMethod ( 'load' ) ; if ( ! isset ( $ params [ 'config' ] ) ) { $ params [ 'config' ] = $ config ; } if ( ! isset ( $ params [ 'options' ] ) ) { $ params [ 'options' ] = $ config ; } if ( ! isset ( $ params [ 'container' ] ) ) { $ params [ 'container' ] = $ this ; } $ object = $ factory -> build ( empty ( $ object_loader ) ? $ name : $ object_loader , $ params ) ; /*
        if (empty($object_loader)) {
            $object_loader = Kernel::DEPENDENCY_LOADER_DEFAULT_NAMESPACE
                .ucfirst(TextHelper::toCamelCase($name));
            if (!class_exists($object_loader)) {
                $object_loader .= Kernel::DEPENDENCY_LOADER_SUFFIX;
            }
        }
        if (!class_exists($object_loader)) {
            throw new \RuntimeException(
                sprintf('Unknown dependency loader for reference "%s"!', $name)
            );
        } elseif (!CodeHelper::impelementsInterface($object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)) {
            throw new \DomainException(
                sprintf('Dependency loader "%s" doesn\'t implement the "%s" interface!',
                    $object_loader, Kernel::DEPENDENCY_LOADER_INTERFACE)
            );
        }
        $loader = new $object_loader;
        $config = $this->get('config')->get($name, \CarteBlanche\App\Config::NOT_FOUND_GRACEFULLY, array());
        $object = $loader->load($config, $this);
*/ return $ this -> set ( $ name , $ object , $ force_overload ) ; }
Instance loader and setter

@param   string  $name           The variable name to set
@param   array   $params         An array of parameters to pass to loader
@param   object  $object_loader  The loader class if so
@param   bool    $force_overload Over-write an existing value ?
@return  bool

@todo Pass arguments (via parameter here and configuration settings)
Instance loader and setter