當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Command\Command類代碼示例

本文整理匯總了PHP中Alchemy\Phrasea\Command\Command的典型用法代碼示例。如果您正苦於以下問題:PHP Command類的具體用法?PHP Command怎麽用?PHP Command使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Command類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testGetFormattedDuration

 /**
  * @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));
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:8,代碼來源:CommandTest.php

示例2: __construct

 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;
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:7,代碼來源:systemMailCheck.php

示例3: __construct

 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;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:28,代碼來源:systemExport.php

示例4: __construct

 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;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:Install.php

示例5: __construct

 /**
  * 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;
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:10,代碼來源:RescanTechnicalDatas.php

示例6: __construct

 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;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:7,代碼來源:systemBackupDB.php

示例7: __construct

 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;
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:8,代碼來源:checkExtension.php

示例8: __construct

 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;
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:8,代碼來源:fieldsDelete.php

示例9: __construct

 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;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:10,代碼來源:fieldsMerge.php

示例10: __construct

 /**
  * 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;
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:16,代碼來源:BuildSubdefs.php

示例11: __construct

    /**
     * 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;
    }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:19,代碼來源:UpgradeDBDatas.php

示例12: __construct

 public function __construct()
 {
     parent::__construct('task-manager:scheduler:resume-tasks');
     $this->setDescription('Resume scheduler started tasks jobs');
 }
開發者ID:romainneutron,項目名稱:Phraseanet,代碼行數:5,代碼來源:SchedulerResumeTasks.php

示例13: __construct

 /**
  * 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;
 }
開發者ID:nlegoff,項目名稱:Phraseanet,代碼行數:9,代碼來源:BuildMissingSubdefs.php

示例14: __construct

 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');
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:5,代碼來源:InstallAll.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('hello:world');
 }
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:4,代碼來源:CustomCommand.php


注:本文中的Alchemy\Phrasea\Command\Command類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。