Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/Navigation.inc.php

    r464 r468  
    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($test_uri, $true_return=true, $false_return=false, $strip_query=false)
     281    public function currentPage($test_uri, $true_return=true, $false_return=false, $strip_query=false)
    282282    {
    283283        $actual_uri = $strip_query ? strtok($_SERVER['REQUEST_URI'], '?') : $_SERVER['REQUEST_URI'];
     
    291291}
    292292// End of class.
    293 
    294 ?>
Note: See TracChangeset for help on using the changeset viewer.