本文整理汇总了PHP中Alchemy\Phrasea\Command\Command类的典型用法代码示例。如果您正苦于以下问题:PHP Command类的具体用法?PHP Command怎么用?PHP Command使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Command类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: __construct
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>');
}
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:5,代码来源:TaskState.php
示例17: __construct
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, '');
}
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:5,代码来源:TaskRun.php
示例18: __construct
public function __construct($name = null)
{
parent::__construct($name);
$this->setDescription("Runs the websocket server");
}
开发者ID:nlegoff,项目名称:Phraseanet,代码行数:5,代码来源:WebsocketServer.php
示例19: __construct
public function __construct($name = null)
{
parent::__construct($name);
$this->setDescription('Displays this program license');
return $this;
}
开发者ID:luisbrito,项目名称:Phraseanet,代码行数:6,代码来源:aboutLicense.php
示例20: __construct
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;
}
开发者ID:romainneutron,项目名称:Phraseanet,代码行数:6,代码来源:systemUpgrade.php
注:本文中的Alchemy\Phrasea\Command\Command类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论