function __construct($url, $content = false) { # store url and converted file path $this->file_path = Helpers::url_to_file_path($url); $this->url_path = $url; $this->template_name = self::template_name($this->file_path); $this->template_file = self::template_file($this->template_name); $this->template_type = self::template_type($this->template_file); # create/set all content variables PageData::create($this, $content); }
function __construct($url) { # store url and converted file path $this->url_path = $url; $this->file_path = Helpers::url_to_file_path($this->url_path); $this->template_name = $this->template_name(); $this->template_file = $this->template_file(); # create/set all content variables PageData::create($this); # sort data array by key length # # this ensures that something like '@title' doesn't turn '@page_title' # into '@page_Contents of @title variable' in the final rendered template # uksort($this->data, array('Helpers', 'sort_by_length')); }