Phrozn/Site/View/Base.php
public function getParams($param = null, $default = array())
    {
    	$params = array();
        $params['page'] = $this->getFrontMatter();
        $params['site'] = $this->getSiteConfig();
        $params['phr'] = $this->getAppConfig();

        $params['current'] = array();
        $inputFile = $this->getInputFile();
        $pos = strpos($inputFile, '/entries');
        if (false !== $pos) {
        	$params['current']['phr_template'] = substr($this->getInputFile(), $pos + 8 + 1);
        }

        // also create merged configuration
        if (isset($params['page'], $params['site'])) {
            $params['this'] = array_merge($params['page'], $params['site'], $params['current']);
        } else {
            $params['this'] = $params['current'];
        }

        if (null !== $param) {
            $params = $this->locateParam($params, $param);
        }

        return isset($params) ? $params : $default;
    }
public function getParams($param = null, $default = array())
    {
    	$params = array();
        $params['page'] = $this->getFrontMatter();
        $params['site'] = $this->getSiteConfig();
        $params['phr'] = $this->getAppConfig();

        $params['current'] = array();
        $inputFile = $this->getInputFile();
        $pos = strpos($inputFile, '/entries');
        if (false !== $pos) {
        	$params['current']['phr_template'] = substr($this->getInputFile(), $pos + 8 + 1);
        }

        // also create merged configuration
        if (isset($params['page'], $params['site'])) {
            $params['this'] = array_merge($params['page'], $params['site'], $params['current']);
        } else {
            $params['this'] = $params['current'];
        }

        if (null !== $param) {
            $params = $this->locateParam($params, $param);
        }

        return isset($params) ? $params : $default;
    }
public function getParams ( $ param = null , $ default = array ( ) ) { $ params = array ( ) ; $ params [ 'page' ] = $ this -> getFrontMatter ( ) ; $ params [ 'site' ] = $ this -> getSiteConfig ( ) ; $ params [ 'phr' ] = $ this -> getAppConfig ( ) ; $ params [ 'current' ] = array ( ) ; $ inputFile = $ this -> getInputFile ( ) ; $ pos = strpos ( $ inputFile , '/entries' ) ; if ( false !== $ pos ) { $ params [ 'current' ] [ 'phr_template' ] = substr ( $ this -> getInputFile ( ) , $ pos + 8 + 1 ) ; } // also create merged configuration if ( isset ( $ params [ 'page' ] , $ params [ 'site' ] ) ) { $ params [ 'this' ] = array_merge ( $ params [ 'page' ] , $ params [ 'site' ] , $ params [ 'current' ] ) ; } else { $ params [ 'this' ] = $ params [ 'current' ] ; } if ( null !== $ param ) { $ params = $ this -> locateParam ( $ params , $ param ) ; } return isset ( $ params ) ? $ params : $ default ; }
Get view parameters from both front matter and general site options

@param string $param Parameter to get value for. Levels are separated with dots
@param string $default Default value to fetch if param is not found

@return array
Get view parameters from both front matter and general site options