Changeset 2968

Show
Ignore:
Timestamp:
07/06/08 18:42:46 (8 weeks ago)
Author:
Shadowhand
Message:

Optimized Form_Input::input_value()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/forge/libraries/Form_Input.php

    r2593 r2968  
    365365     * @return  string|bool 
    366366     */ 
    367     protected function input_value() 
    368     { 
    369         static $input, $method; 
    370  
    371         if ($input === NULL) 
    372         { 
    373             // Load the Input library 
    374             $input = new Input; 
    375         } 
     367    protected function input_value($name === array()) 
     368    { 
     369        // Get the Input instance 
     370        $input = Input::instance(); 
    376371 
    377372        // Fetch the method for this object 
    378373        $method = $this->method; 
    379374 
    380         return (func_num_args() > 0) ? $input->$method(func_get_arg(0)) : $input->$method(); 
     375        return $input->$method($name, NULL); 
    381376    } 
    382377