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/PageSequence.inc.php

    r396 r468  
    3535class PageSequence
    3636{
    37     var $current_step_id = 0;
    38     var $start_url;
    39     var $sequence_title = '';
    40     var $seq = '_sequence_';
    41     var $idle_timeout;
     37    public $current_step_id = 0;
     38    public $start_url;
     39    public $sequence_title = '';
     40    public $seq = '_sequence_';
     41    public $idle_timeout;
    4242
    4343    /**
     
    4747     * @access public
    4848     */
    49     function PageSequence($params)
     49    public function __construct($params)
    5050    {
    5151        if (isset($params['sequence_title'])) {
     
    8484     * @access public
    8585     */
    86     function addStep($step_id, $params)
     86    public function addStep($step_id, $params)
    8787    {
    8888        // Keys for the steps array cannot be numeric.
     
    114114     * @return bool true on success, false on failure
    115115     */
    116     function setFeature($step_id=null, $features)
     116    public function setFeature($step_id=null, $features)
    117117    {
    118118        $pos = isset($step_id) ? $this->getPosition($step_id) : $this->getPosition();
     
    134134     * @return mixed          Value stored in session.
    135135     */
    136     function getFeature($step_id, $key, $default='')
     136    public function getFeature($step_id, $key, $default='')
    137137    {
    138138        $pos = isset($step_id) ? $this->getPosition($step_id) : $this->getPosition();
     
    151151     * @access public
    152152     */
    153     function setCurrent($step_id)
     153    public function setCurrent($step_id)
    154154    {
    155155        $app =& App::getInstance();
     
    171171     * @access public
    172172     */
    173     function getID($pos=null)
     173    public function getID($pos=null)
    174174    {
    175175        if (isset($pos)) {
     
    188188     * @access public
    189189     */
    190     function getPosition($step_id=null)
     190    public function getPosition($step_id=null)
    191191    {
    192192        // Get current step id if step not provided.
     
    217217     * @access public
    218218     */
    219     function getRequiredID($curr_step_id)
     219    public function getRequiredID($curr_step_id)
    220220    {
    221221        if ('' === $curr_step_id) {
     
    242242     * @access public
    243243     */
    244     function getNextID()
     244    public function getNextID()
    245245    {
    246246        // Loop through all steps.
     
    263263     * @access public
    264264     */
    265     function complete($step_id=null)
     265    public function complete($step_id=null)
    266266    {
    267267        $pos = isset($step_id) ? $this->getPosition($step_id) : $this->getPosition();
     
    277277     * @access public
    278278     */
    279     function printEditLink($step_id=null)
     279    public function printEditLink($step_id=null)
    280280    {
    281281        $app =& App::getInstance();
     
    296296     * @access public
    297297     */
    298     function setDataDefault($data_key, $data_val)
     298    public function setDataDefault($data_key, $data_val)
    299299    {
    300300        if (!isset($_SESSION[$this->seq]['data'][$data_key])) {
     
    310310     * @access public
    311311     */
    312     function getData($data_key=null)
     312    public function getData($data_key=null)
    313313    {
    314314        if (!isset($data_key)) {
     
    328328     * @access public
    329329     */
    330     function clearData($data_key=null)
     330    public function clearData($data_key=null)
    331331    {
    332332        if (isset($data_key)) {
     
    342342     * Deletes all data that are older than auto_timeout. Set current time if not not expired or not set.
    343343     */
    344     function _auto_timeout()
     344    private function _auto_timeout()
    345345    {
    346346        $app =& App::getInstance();
     
    363363     * @access public
    364364     */
    365     function registerData($step_data)
     365    public function registerData($step_data)
    366366    {
    367367        $_SESSION[$this->seq]['data'] = array_merge($_SESSION[$this->seq]['data'], $step_data);
     
    372372     *
    373373     */
    374     function startOver()
     374    public function startOver()
    375375    {
    376376        $this->current_step_id = 0;
     
    383383} // END CLASS
    384384
    385 ?>
Note: See TracChangeset for help on using the changeset viewer.