public function addViewNamespaces($xAppConfig)
    {
        $sDefaultNamespace = $xAppConfig->getOption('options.views.default', false);
        if(is_array($namespaces = $xAppConfig->getOptionNames('views')))
        {
            foreach($namespaces as $namespace => $option)
            {
                // If no default namespace is defined, use the first one as default.
                if($sDefaultNamespace == false)
                {
                    $sDefaultNamespace = $namespace;
                }
                // Save the namespace
                $directory = $xAppConfig->getOption($option . '.directory');
                $extension = $xAppConfig->getOption($option . '.extension', '');
                $renderer = $xAppConfig->getOption($option . '.renderer', 'jaxon');
                $this->addViewNamespace($namespace, $directory, $extension, $renderer);
            }
        }

        // Save the view renderers and namespaces in the DI container
        $this->initViewRenderers($this->aViewRenderers);
        $this->initViewNamespaces($this->aViewNamespaces, $sDefaultNamespace);
    }
public function addViewNamespaces($xAppConfig)
    {
        $sDefaultNamespace = $xAppConfig->getOption('options.views.default', false);
        if(is_array($namespaces = $xAppConfig->getOptionNames('views')))
        {
            foreach($namespaces as $namespace => $option)
            {
                // If no default namespace is defined, use the first one as default.
                if($sDefaultNamespace == false)
                {
                    $sDefaultNamespace = $namespace;
                }
                // Save the namespace
                $directory = $xAppConfig->getOption($option . '.directory');
                $extension = $xAppConfig->getOption($option . '.extension', '');
                $renderer = $xAppConfig->getOption($option . '.renderer', 'jaxon');
                $this->addViewNamespace($namespace, $directory, $extension, $renderer);
            }
        }

        // Save the view renderers and namespaces in the DI container
        $this->initViewRenderers($this->aViewRenderers);
        $this->initViewNamespaces($this->aViewNamespaces, $sDefaultNamespace);
    }
public function addViewNamespaces ( $ xAppConfig ) { $ sDefaultNamespace = $ xAppConfig -> getOption ( 'options.views.default' , false ) ; if ( is_array ( $ namespaces = $ xAppConfig -> getOptionNames ( 'views' ) ) ) { foreach ( $ namespaces as $ namespace => $ option ) { // If no default namespace is defined, use the first one as default. if ( $ sDefaultNamespace == false ) { $ sDefaultNamespace = $ namespace ; } // Save the namespace $ directory = $ xAppConfig -> getOption ( $ option . '.directory' ) ; $ extension = $ xAppConfig -> getOption ( $ option . '.extension' , '' ) ; $ renderer = $ xAppConfig -> getOption ( $ option . '.renderer' , 'jaxon' ) ; $ this -> addViewNamespace ( $ namespace , $ directory , $ extension , $ renderer ) ; } } // Save the view renderers and namespaces in the DI container $ this -> initViewRenderers ( $ this -> aViewRenderers ) ; $ this -> initViewNamespaces ( $ this -> aViewNamespaces , $ sDefaultNamespace ) ; }
Set the view namespaces.

@param Config            $xAppConfig             The application config options

@return void
Set the view namespaces .