class Page

The class is used for collecting the properties of the page being displayed. The “Singleton” pattern being implemented, it may be called just once from anywhere within the application.

 	
class Page
{
    public $title ='';
    public $html_title ='';
    public $code = 'index';
    public $id = 0;
    public $meta_description = '';
    public $meta_keywords ='';
    public $theme = 'default';

    /**
     * Get Object Instance (Singleton)
     * @return Page
     */
    static public function getInstance()

    /**
     * Define Open Graph property
     * @param string $key - property name
     * @param string $value
     */
    public function setOgProperty($key , $value)

    /**
     * Generate meta tags with Open Graph metadata
     * @return string
     */
    public function getOgMeta()

    /**
     * Set templates directory
     * @param string $path
     */
    public function setTemplatesPath($path)

    /**
     * Get path to the folder with current theme templates
     * @return string
     */
    public function getThemePath()

    /**
     * Get template path 
     * The template is to searched for in the theme folder. 
     * Otherwise, the system will attempt to load it from the template root folder
     * @param string $template - filename
     * @return string
     */
    public function getTemplatePath($template)
}

comments powered by Disqus