Assembla home | Assembla project page
 

Changeset 94

Show
Ignore:
Timestamp:
03/01/08 19:40:53 (9 months ago)
Author:
Seldaek
Message:

* Fixes parameter parsing in Command

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Plugin/Abstract/Command.php

    r68 r94  
    4646                if (strpos($name, 'onDo') === 0) { 
    4747                    $this->methods[strtolower(substr($name, 4))] = 
    48                         $method->getNumberOfRequiredParameters(); 
     48                        array( 
     49                                $method->getNumberOfParameters(), 
     50                                $method->getNumberOfRequiredParameters() 
     51                        ); 
    4952                } 
    5053            } 
     
    6265                    } 
    6366                } else { 
    64                     $params = preg_split('/\s+/', $params, $this->methods[$command]); 
    65                     if ($this->methods[$command] <= count($params)) { 
     67                    $params = preg_split('/\s+/', $params, $this->methods[$command][0]); 
     68                    if ($this->methods[$command][1] <= count($params)) { 
    6669                        call_user_func_array(array($this, $method), $params); 
    6770                    }