src/TaskManager.php
public static function parseCommand($command)
    {
        if (preg_match('/([\w\\\\]+)::(\w+)\((.*)\)/', $command, $match)) {
            $params = explode(',', $match[3]);
            if ((1 == count($params)) && ('' == $params[0])) {
                //prevents to pass an empty string
                $params[0] = null;
            }
            return array(
                $match[1],
                $match[2],
                $params
            );
        }

        throw new TaskManagerException('Command not recognized');
    }
public static function parseCommand($command)
    {
        if (preg_match('/([\w\\\\]+)::(\w+)\((.*)\)/', $command, $match)) {
            $params = explode(',', $match[3]);
            if ((1 == count($params)) && ('' == $params[0])) {
                //prevents to pass an empty string
                $params[0] = null;
            }
            return array(
                $match[1],
                $match[2],
                $params
            );
        }

        throw new TaskManagerException('Command not recognized');
    }
public static function parseCommand ( $ command ) { if ( preg_match ( '/([\w\\\\]+)::(\w+)\((.*)\)/' , $ command , $ match ) ) { $ params = explode ( ',' , $ match [ 3 ] ) ; if ( ( 1 == count ( $ params ) ) && ( '' == $ params [ 0 ] ) ) { //prevents to pass an empty string $ params [ 0 ] = null ; } return array ( $ match [ 1 ] , $ match [ 2 ] , $ params ) ; } throw new TaskManagerException ( 'Command not recognized' ) ; }
Parses command and returns an array which contains class, method and arguments of the command
@param string $command
@return array
@throws TaskManagerException
Parses command and returns an array which contains class method and arguments of the command