Ignore:
Timestamp:
Nov 30, 2013 7:30:44 PM (11 years ago)
Author:
anonymous
Message:

added public and private keywords to all properties and methods, changed old classname constructor function to construct, removed more ?> closing tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eli_branch/lib/Navigation.inc.php

    r396 r439  
    3737
    3838    // Configuration parameters for this object.
    39     var $_params = array(       
     39    private $_params = array(       
    4040        'head_title' => true,
    4141        'body_title' => true,
     
    4848        'last_crumb_format' => '%s',
    4949    );
    50     var $pages = array();
     50    public $pages = array();
    5151
    5252    /**
    5353     * Navigation constructor.
    5454     */
    55     function Navigation($params=null)
     55    public function __construct($params=null)
    5656    {
    5757        $app =& App::getInstance();
     
    7474     * @param   array   $vars       Additional page variables.
    7575     */
    76     function add($title, $url=null, $vars=array())
     76    public function add($title, $url=null, $vars=array())
    7777    {
    7878        $page = array(
     
    9191     * @param  array    $params     Array of parameters (key => val pairs).
    9292     */
    93     function setParam($params)
     93    public function setParam($params)
    9494    {
    9595        $app =& App::getInstance();
     
    110110     * @return mixed               Configured parameter value.
    111111     */
    112     function getParam($param)
     112    public function getParam($param)
    113113    {
    114114        $app =& App::getInstance();
     
    127127     * @access  public
    128128     */
    129     function clear()
     129    public function clear()
    130130    {
    131131        $this->pages = array();
     
    139139     * @param mixed $val      Value to set variable to.
    140140     */
    141     function set($key, $val)
     141    public function set($key, $val)
    142142    {
    143143        // Set params of current page.
     
    154154     * @return mixed          Value stored in session.
    155155     */
    156     function get($key, $default='')
     156    public function get($key, $default='')
    157157    {
    158158        $curr_page =& $this->pages[sizeof($this->pages) - 1];
     
    205205     * @return  mixed           Path (string) or false if path param is not set.
    206206     */
    207     function getPath($key='title')
     207    public function getPath($key='title')
    208208    {
    209209        if ($this->getParam('path')) {
     
    227227     * @return  string   Breadcrumbs or empty string if breadcrumbs param not set.
    228228     */
    229     function getBreadcrumbs()
     229    public function getBreadcrumbs()
    230230    {
    231231        $app =& App::getInstance();
     
    279279     * @return  mixed   The value set for $return, TRUE by default.
    280280     */
    281     function currentPage($page_uri, $return=true)
     281    public function currentPage($page_uri, $return=true)
    282282    {
    283283        if (preg_match('/^' . preg_quote(urldecode($page_uri), '/') . '/i', $_SERVER['PHP_SELF'])) {
     
    288288}
    289289// End of class.
    290 
    291 ?>
Note: See TracChangeset for help on using the changeset viewer.