public function render($sViewName, array $aViewData = array())
    {
        // Get the store
        $store = $this->store();
        // Get the default view namespace
        $sNamespace = $this->sNamespace;
        // Get the namespace from the view name
        $iSeparatorPosition = strrpos($sViewName, '::');
        if($iSeparatorPosition !== false)
        {
            $sNamespace = substr($sViewName, 0, $iSeparatorPosition);
        }
        if(!key_exists($sNamespace, $this->aRenderers))
        {
            // Cannot render a view if there's no renderer corresponding to the namespace.
            return null;
        }
        $sRenderer = $this->aRenderers[$sNamespace];
        $store->setView($sRenderer, $sNamespace, $sViewName, array_merge($this->aViewData, $aViewData));
        // Set the store to null so a new store will be created for the next view.
        $this->xStore = null;
        // Return the store
        return $store;
    }
public function render($sViewName, array $aViewData = array())
    {
        // Get the store
        $store = $this->store();
        // Get the default view namespace
        $sNamespace = $this->sNamespace;
        // Get the namespace from the view name
        $iSeparatorPosition = strrpos($sViewName, '::');
        if($iSeparatorPosition !== false)
        {
            $sNamespace = substr($sViewName, 0, $iSeparatorPosition);
        }
        if(!key_exists($sNamespace, $this->aRenderers))
        {
            // Cannot render a view if there's no renderer corresponding to the namespace.
            return null;
        }
        $sRenderer = $this->aRenderers[$sNamespace];
        $store->setView($sRenderer, $sNamespace, $sViewName, array_merge($this->aViewData, $aViewData));
        // Set the store to null so a new store will be created for the next view.
        $this->xStore = null;
        // Return the store
        return $store;
    }
public function render ( $ sViewName , array $ aViewData = array ( ) ) { // Get the store $ store = $ this -> store ( ) ; // Get the default view namespace $ sNamespace = $ this -> sNamespace ; // Get the namespace from the view name $ iSeparatorPosition = strrpos ( $ sViewName , '::' ) ; if ( $ iSeparatorPosition !== false ) { $ sNamespace = substr ( $ sViewName , 0 , $ iSeparatorPosition ) ; } if ( ! key_exists ( $ sNamespace , $ this -> aRenderers ) ) { // Cannot render a view if there's no renderer corresponding to the namespace. return null ; } $ sRenderer = $ this -> aRenderers [ $ sNamespace ] ; $ store -> setView ( $ sRenderer , $ sNamespace , $ sViewName , array_merge ( $ this -> aViewData , $ aViewData ) ) ; // Set the store to null so a new store will be created for the next view. $ this -> xStore = null ; // Return the store return $ store ; }
Render a view using a store

The store returned by this function will later be used with the make() method to render the view.

@param string        $sViewName        The view name
@param array         $aViewData        The view data

@return Store        A store populated with the view data
Render a view using a store