public function load($filename, $merge_globals = true, $stack_name = null, $handler = null)
    {
        $file = new \SplFileInfo($filename);
        if ($file->isFile()) {
            if (empty($handler)) {
                $handler = $file->getExtension();
            }
            $factory = \Library\Factory::create()
                ->factoryName(__CLASS__)
                ->mustImplement(Kernel::CONFIG_FILETYPE_INTERFACE)
                ->defaultNamespace(Kernel::CONFIG_FILETYPE_DEFAULT_NAMESPACE)
                ->classNameMask(array('%s', '%s'.Kernel::CONFIG_FILETYPE_SUFFIX))
                ;
            $config = $factory->build($handler);
            $values = $config->parse($file);
            if (!empty($values)) {
                $this->set($values, $merge_globals, $stack_name);
                $this->_registerConfigFile($filename, count($values));
            } else {
                $this->_registerConfigFile($filename, 'empty content');
            }
        } else {
            throw new ErrorException(
                sprintf('Configuration file "%s" not found!', $filename)
            );
        }
        return $this;
    }