Exemplo n.º 1
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Checks if email addresses are uniques (mandatory since 3.5)');
     $this->addOption('list', 'l', null, 'List all bad accounts instead of the interactive mode');
     return $this;
 }
Exemplo n.º 2
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Exports all phraseanet records to a given directory');
     /**
      * To implement
      */
     //    $this->addOption('useoriginalname', 'o', InputOption::VALUE_OPTIONAL
     //      , 'Use original name for dest files', false);
     /**
      * To implement
      */
     //    $this->addOption('excludefield', 'f', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY
     //      , 'Exclude field from XML', []);
     /**
      * To implement
      */
     //    $this->addOption('excludestatus', '', InputOption::VALUE_OPTIONAL
     //      , 'Exclude Status', false);
     $this->addOption('docperdir', 'd', InputOption::VALUE_OPTIONAL, 'Maximum number of files per dir', 100);
     $this->addOption('caption', 'c', InputOption::VALUE_OPTIONAL, 'Export Caption (XML)', false);
     $this->addOption('limit', 'l', InputOption::VALUE_OPTIONAL, 'Limit files quantity (for test purposes)', false);
     $this->addOption('base_id', 'b', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Restrict on base_ids', []);
     $this->addOption('sbas_id', 's', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Restrict on sbas_ids', []);
     $this->addArgument('directory', InputOption::VALUE_REQUIRED, 'The directory where to export');
     $this->addOption('sanitize', '', InputOption::VALUE_REQUIRED, 'Sanitize filenames. Set to 0 to disable', true);
     return $this;
 }
Exemplo n.º 3
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->executableFinder = new ExecutableFinder();
     $this->setDescription("Installs Phraseanet")->addOption('email', null, InputOption::VALUE_OPTIONAL, 'Admin e-mail address', null)->addOption('password', null, InputOption::VALUE_OPTIONAL, 'Admin password', null)->addOption('db-host', null, InputOption::VALUE_OPTIONAL, 'MySQL server host', 'localhost')->addOption('db-port', null, InputOption::VALUE_OPTIONAL, 'MySQL server port', 3306)->addOption('db-user', null, InputOption::VALUE_OPTIONAL, 'MySQL server user', 'phrasea')->addOption('db-password', null, InputOption::VALUE_OPTIONAL, 'MySQL server password', null)->addOption('db-template', null, InputOption::VALUE_OPTIONAL, 'Metadata structure language template (available are fr (french) and en (english))', null)->addOption('databox', null, InputOption::VALUE_OPTIONAL, 'Database name for the DataBox', null)->addOption('appbox', null, InputOption::VALUE_OPTIONAL, 'Database name for the ApplicationBox', null)->addOption('data-path', null, InputOption::VALUE_OPTIONAL, 'Path to data repository', realpath(__DIR__ . '/../../../../../datas'))->addOption('server-name', null, InputOption::VALUE_OPTIONAL, 'Server name')->addOption('indexer', null, InputOption::VALUE_OPTIONAL, 'Path to Phraseanet Indexer', 'auto')->addOption('yes', 'y', InputOption::VALUE_NONE, 'Answer yes to all questions');
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Constructor
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Rescans records for technical datas');
     $this->setHelp('Old Phraseanet version did not fully read technical datas. This command rescan all records of these datas.');
     return $this;
 }
Exemplo n.º 5
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $dir = sprintf('%s/config/', dirname(dirname(dirname(dirname(__DIR__)))));
     $this->setDescription('Backups Phraseanet Databases')->addArgument('directory', null, 'The directory where to backup', $dir)->addOption('timeout', 't', InputOption::VALUE_REQUIRED, 'The timeout for this command (default is 3600s / 1h). Set 0 to disable timeout.', 3600)->addOption('gzip', 'g', null, 'Gzip the output (requires gzip utility)')->addOption('bzip', 'b', null, 'Bzip the output (requires bzip2 utility)');
     return $this;
 }
Exemplo n.º 6
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Performs a serie of tests against Phrasea Engine PHP Extension');
     $this->addArgument('usr_id', InputOption::VALUE_REQUIRED, 'Usr_id to use.');
     $this->addOption('query', '', InputOption::VALUE_OPTIONAL, 'The query', 'last');
     return $this;
 }
Exemplo n.º 7
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Deletes a documentation field from a Databox');
     $this->addArgument('meta_struct_id', InputArgument::REQUIRED, 'Metadata structure id destination');
     $this->addArgument('sbas_id', InputArgument::REQUIRED, 'Databox sbas_id');
     return $this;
 }
Exemplo n.º 8
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Merges databox documentation fields');
     $this->addArgument('sbas_id', InputArgument::REQUIRED, 'Databox sbas_id');
     $this->addArgument('destination', InputArgument::REQUIRED, 'Metadata structure id destination');
     $this->addArgument('source', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'Metadata structure ids for source');
     $this->addOption('separator', '', InputOption::VALUE_OPTIONAL, 'Separator for concatenation (if destination is monovalued)', ';');
     return $this;
 }
Exemplo n.º 9
0
 /**
  * Constructor
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Build subviews for given subview names and record types');
     $this->addArgument('databox', InputArgument::REQUIRED, 'The databox id');
     $this->addArgument('type', InputArgument::REQUIRED, 'Types of the document to rebuild');
     $this->addArgument('subdefs', InputArgument::REQUIRED, 'Names of sub-definition to re-build');
     $this->addOption('max_record', 'max', InputOption::VALUE_OPTIONAL, 'Max record id');
     $this->addOption('min_record', 'min', InputOption::VALUE_OPTIONAL, 'Min record id');
     $this->addOption('with-substitution', 'wsubstit', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well');
     $this->addOption('substitution-only', 'substito', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only');
     return $this;
 }
Exemplo n.º 10
0
    /**
     * Constructor
     */
    public function __construct($name = null)
    {
        parent::__construct($name);
        $this->setDescription("Upgrades Phraseanet datas, useful after migrations")->setHelp(<<<EOF
Upgrade Phraseanet datas from older version

Steps are

    - version 3.1 : records UUID
    - version 3.5 : metadatas upgrade
EOF
);
        $this->addOption('from', 'f', InputOption::VALUE_REQUIRED, 'The version where to start upgrade');
        $this->addOption('at-version', null, InputOption::VALUE_REQUIRED, 'The version step to upgrade');
        return $this;
    }
 public function __construct()
 {
     parent::__construct('task-manager:scheduler:resume-tasks');
     $this->setDescription('Resume scheduler started tasks jobs');
 }
Exemplo n.º 12
0
 /**
  * Constructor
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Builds subviews that previously failed to be generated / did not exist when records were added');
     return $this;
 }
Exemplo n.º 13
0
 public function __construct()
 {
     parent::__construct('dependencies:all');
     $this->setDescription('Installs all dependencies')->addOption('no-dev', 'd', InputOption::VALUE_NONE, 'Do not install dev dependencies')->addOption('prefer-source', 'p', InputOption::VALUE_NONE, 'Use the --prefer-source composer option')->addOption('clear-cache', null, InputOption::VALUE_NONE, 'If defined forces to clear the cache before installation');
 }
Exemplo n.º 14
0
 /**
  * @covers Alchemy\Phrasea\Command\Command::getFormattedDuration
  */
 public function testGetFormattedDuration()
 {
     $this->assertRegExp('/50 \\w+/', $this->object->getFormattedDuration(50));
     $this->assertRegExp('/1(\\.|,)2 \\w+/', $this->object->getFormattedDuration(70));
 }
Exemplo n.º 15
0
 public function __construct()
 {
     parent::__construct('assets:compile-less');
     $this->setDescription('Compiles Phraseanet LESS files');
 }
Exemplo n.º 16
0
 public function __construct()
 {
     parent::__construct('hello:world');
 }
Exemplo n.º 17
0
 public function __construct()
 {
     parent::__construct('phraseanet:generate-js-fixtures');
     $this->setDescription('Generate JS fixtures');
 }
Exemplo n.º 18
0
 public function __construct()
 {
     parent::__construct('task-manager:task:state');
     $this->addArgument('task_id', InputArgument::REQUIRED, 'The task_id to test')->setDescription('Returns the state of a task')->addOption('short', null, InputOption::VALUE_NONE, 'print short result, ie: <info>stopped()</info> | <info>started(12345)</info> | <info>tostop(12345)</info> | <info>...</info>');
 }
Exemplo n.º 19
0
 public function __construct()
 {
     parent::__construct('ini:setup-tests-dbs');
     $this->setDescription('Setup dbs for tests environment');
 }
Exemplo n.º 20
0
 public function __construct()
 {
     parent::__construct('system:uninstall');
     $this->setDescription('Uninstall Phraseanet');
 }
Exemplo n.º 21
0
 public function __construct()
 {
     parent::__construct('task-manager:task:run');
     $this->setDescription('Runs a task')->addArgument('task_id', InputArgument::REQUIRED, 'The id of the task to run', null)->addOption('max-memory', null, InputOption::VALUE_REQUIRED, '')->addOption('max-duration', null, InputOption::VALUE_REQUIRED, '')->addOption('listen-signal', null, InputOption::VALUE_NONE, '');
 }
Exemplo n.º 22
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription("Runs the websocket server");
 }
Exemplo n.º 23
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Displays this program license');
     return $this;
 }
Exemplo n.º 24
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Upgrades Phraseanet to the latest version')->addOption('yes', 'y', InputOption::VALUE_NONE, 'Answers yes to all questions and do not ask the user')->addOption('force', 'f', InputOption::VALUE_NONE, 'Forces the upgrade even if there is a concurrent upgrade')->addOption('dump', 'd', InputOption::VALUE_NONE, 'Dumps SQL queries that can be used to clean database.')->addOption('stderr', 's', InputOption::VALUE_NONE, 'Dumps SQL queries to stderr');
     return $this;
 }
Exemplo n.º 25
0
 public function __construct()
 {
     parent::__construct('ini:reset');
     $this->setDescription('Reset environment')->addOption('yes', 'y', InputOption::VALUE_NONE, 'Answers yes to all questions and do not ask the user')->addOption('email', null, InputOption::VALUE_OPTIONAL, 'Admin e-mail address', null)->addOption('password', null, InputOption::VALUE_OPTIONAL, 'Admin password', null)->addOption('db-name', null, InputOption::VALUE_OPTIONAL, 'Databox name to reset, in case of multiple databox are mounted', null)->addOption('dependencies', null, InputOption::VALUE_NONE, 'Fetch dependencies', null)->addOption('run-patches', null, InputOption::VALUE_NONE, 'Reset in v3.1 states & apply all patches', null)->addOption('no-setup-dbs', null, InputOption::VALUE_NONE, 'Do not create dbs for setup tests used in phpunit test suite', null);
 }
 public function __construct($name = null)
 {
     parent::__construct('xsendfile:generate-mapping');
     $this->addOption('write', 'w', null, 'Writes the configuration')->addOption('enabled', 'e', null, 'Set the enable toggle to `true`')->addArgument('type', InputArgument::REQUIRED, 'The configuration type, either `nginx` or `apache`')->setDescription('Generates Phraseanet xsendfile mapping configuration depending on databoxes configuration');
 }
Exemplo n.º 27
0
 public function __construct()
 {
     parent::__construct('phraseanet:regenerate-sqlite');
     $this->setDescription("Updates the sqlite 'tests/db-ref.sqlite' database with current database definition.");
 }
Exemplo n.º 28
0
 /**
  * Constructor
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->setDescription('Creates a collection in Phraseanet')->setHelp('')->addArgument('databox_id', InputArgument::REQUIRED, 'The id of the databox where to create the collection', null)->addArgument('collname', InputArgument::REQUIRED, 'The name of the new collection', null)->addOption('base_id_rights', 'd', InputOption::VALUE_OPTIONAL, 'Duplicate rights from another collection', null);
     return $this;
 }
Exemplo n.º 29
0
 public function __construct()
 {
     parent::__construct('behat:help');
     $this->setDescription('Prints helps about Phraseanet configuration for behat tests');
 }
Exemplo n.º 30
0
 public function __construct()
 {
     parent::__construct('task-manager:scheduler:state');
     $this->setDescription('Returns scheduler state')->addOption('short', null, InputOption::VALUE_NONE, 'print short result, ie: <info>stopped()</info> | <info>started(12345)</info> | <info>tostop(12345)</info> | <info>stopping(12345)</info>');
 }