$commandRunner = new CommandRunner(new Application(ROOT . DS . 'config'), 'cake'); $commandRunner->run([ 'bin' . DS . 'cake', 'command_name', 'param1', 'param2, ]);
上記は
$ bin/cake command_name param1 param2
と同等。