コード例 #1
0
ファイル: CommandTest.php プロジェクト: kankje/xi-filelib
 /**
  * @test
  */
 public function passesCommandThrough()
 {
     $key = 0;
     $definition = new ExecuteMethodCommand('cropThumbnailImage', [800, 200]);
     $command = Command::createCommandFromDefinition($key, $definition);
     $this->assertSame($definition, $command);
 }
コード例 #2
0
 /**
  * @param string $identifier
  * @param array $commandDefinitions
  * @param string $mimeType
  */
 public function __construct($identifier, array $commandDefinitions = array(), $mimeType = null)
 {
     $this->mimeType = $mimeType;
     $this->identifier = $identifier;
     foreach ($commandDefinitions as $key => $commandDefinition) {
         $this->addCommand(Command::createCommandFromDefinition($key, $commandDefinition));
     }
 }