views/AbstractView.php
/**
     * Fetches appropriate template by given template key and returns its content
     *
     * @param string $templateKey
     * @return string
     */
Fetches appropriate template by given template key and returns its content
@param string $templateKey
@return string
Fetches appropriate template by given template key and returns its content @param string $templateKey @return string
public function render($templateKey, $return = false) {
        $content = '';
        $this->prepareDisplay();
        $templateKey = strtoupper($templateKey);
        if ($this->isTemplateAvailable($templateKey)) {
            $content = $this->getTemplateMarkup($templateKey);
        } elseif ($this->isErrorTemplate($templateKey)) {
            $content = $this->getErrorTemaplateMarkup($templateKey);
        } else {
            $errorCode = Constants::ERROR_RESOURCE_NOT_FOUND;
            $content = $this->getErrorTemaplateMarkup($errorCode);
        }
        if ($return) {
            return $this->smarty->fetch('string: ' . $content);
        } else {
            $this->smarty->display('string: '. $content);
            return null;
        }
    }
public function render ( $ templateKey , $ return = false ) { $ content = '' ; $ this -> prepareDisplay ( ) ; $ templateKey = strtoupper ( $ templateKey ) ; if ( $ this -> isTemplateAvailable ( $ templateKey ) ) { $ content = $ this -> getTemplateMarkup ( $ templateKey ) ; } elseif ( $ this -> isErrorTemplate ( $ templateKey ) ) { $ content = $ this -> getErrorTemaplateMarkup ( $ templateKey ) ; } else { $ errorCode = Constants :: ERROR_RESOURCE_NOT_FOUND ; $ content = $ this -> getErrorTemaplateMarkup ( $ errorCode ) ; } if ( $ return ) { return $ this -> smarty -> fetch ( 'string: ' . $ content ) ; } else { $ this -> smarty -> display ( 'string: ' . $ content ) ; return null ; } }
Fetches appropriate template by given template key and returns its content
 @param string $templateKey
 @return string
Fetches appropriate template by given template key and returns its content @param string $templateKey @return string