/** * Create a new model instance from a command. * * @param CommandInterface * @return array */ public static function fromCommand(CommandInterface $command) { $file = new self(); $file->setParameters($command->getResponse()->json() + array('path' => $command['path'])); $file->finishUpload(); return $file->getParameters(); }