Example #1
0
 /**
  * Execute this command
  * @param array $arguments Array of commandline arguments
  */
 public function execute(array $arguments)
 {
     $comp = new \Cx\Core\Core\Model\Entity\ReflectionComponent($arguments[3], $arguments[2]);
     $customized = false;
     if (isset($arguments[5])) {
         if ($arguments[5] == 'customized') {
             $customized = true;
         }
         $arguments[4] = $arguments[5];
     }
     $zipPath = $arguments[4];
     if (file_exists($zipPath)) {
         if (!$this->interface->yesNo('File is already exists. Do you want to overwrite it?')) {
             return;
         }
     }
     $comp->pack($zipPath, $customized);
     $this->interface->show('Component exported successfully.');
 }