本文整理汇总了PHP中N98\Util\Console\Helper\Table\Renderer\RendererFactory类的典型用法代码示例。如果您正苦于以下问题:PHP RendererFactory类的具体用法?PHP RendererFactory怎么用?PHP RendererFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RendererFactory类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: creation
/**
* @test
*/
public function creation()
{
$renderer = new XmlRenderer();
$this->assertInstanceOf(__NAMESPACE__ . '\\XmlRenderer', $renderer);
$renderFactory = new RendererFactory();
$renderer = $renderFactory->create('xml');
$this->assertInstanceOf(__NAMESPACE__ . '\\XmlRenderer', $renderer);
}
开发者ID:netz98,项目名称:n98-magerun,代码行数:11,代码来源:XmlRendererTest.php
示例2: renderByFormat
/**
* @param OutputInterface $outputInterface
* @param array $rows
* @param string $format
*/
public function renderByFormat(OutputInterface $outputInterface, array $rows, $format = '')
{
$rendererFactory = new RendererFactory();
$renderer = $rendererFactory->create($format);
if ($renderer && $renderer instanceof RendererInterface) {
foreach ($rows as &$row) {
$row = array_combine($this->headers, $row);
}
$renderer->render($outputInterface, $rows);
} else {
$this->setRows($rows);
$this->render($outputInterface);
}
}
开发者ID:navarr,项目名称:n98-magerun,代码行数:19,代码来源:TableHelper.php
示例3: configure
protected function configure()
{
$help = <<<'HELP'
<comment>TYPE OPTIONS</comment>
<info>QUICK</info>
Do not scan the rows to check for incorrect links.
Applies to InnoDB and MyISAM tables and views.
<info>FAST</info>
Check only tables that have not been closed properly.
Applies only to MyISAM tables and views; ignored for InnoDB.
<info>CHANGED</info>
Check only tables that have been changed since the last check or that
have not been closed properly. Applies only to MyISAM tables and views;
ignored for InnoDB.
<info>MEDIUM</info>
Scan rows to verify that deleted links are valid.
This also calculates a key checksum for the rows and verifies this with a
calculated checksum for the keys. Applies only to MyISAM tables and views;
ignored for InnoDB.
<info>EXTENDED</info>
Do a full key lookup for all keys for each row. This ensures that the table
is 100% consistent, but takes a long time.
Applies only to MyISAM tables and views; ignored for InnoDB.
<comment>InnoDB</comment>
InnoDB tables will be optimized with the ALTER TABLE ... ENGINE=InnoDB statement.
The options above do not apply to them.
HELP;
$this->setName('db:maintain:check-tables')->setDescription('Check database tables')->addOption('type', null, InputOption::VALUE_OPTIONAL, 'Check type (one of QUICK, FAST, MEDIUM, EXTENDED, CHANGED)', 'MEDIUM')->addOption('repair', null, InputOption::VALUE_NONE, 'Repair tables (only MyISAM)')->addOption('table', null, InputOption::VALUE_OPTIONAL, 'Process only given table (wildcards are supported)')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->setHelp($help);
}
开发者ID:brentwpeterson,项目名称:n98-magerun2,代码行数:31,代码来源:CheckTablesCommand.php
示例4: configure
protected function configure()
{
$this->setName('customer:list')->setDescription('Lists all magento customers')->addArgument('search', InputArgument::OPTIONAL, 'Search query')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
Lists all Magento Customers of current installation.
HELP;
$this->setHelp($help);
}
开发者ID:ktomk,项目名称:n98-magerun2,代码行数:8,代码来源:ListCommand.php
示例5: configure
protected function configure()
{
$this->setName('index:list')->setDescription('Lists all magento indexes')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
Lists all Magento indexers of current installation.
HELP;
$this->setHelp($help);
}
开发者ID:lslab,项目名称:n98-magerun,代码行数:8,代码来源:ListCommand.php
示例6: configure
protected function configure()
{
$this->setName('sys:setup:compare-versions')->addOption('ignore-data', null, InputOption::VALUE_NONE, 'Ignore data updates')->addOption('log-junit', null, InputOption::VALUE_REQUIRED, 'Log output to a JUnit xml file.')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->setDescription('Compare module version with core_resource table.');
$help = <<<HELP
Compares module version with saved setup version in `core_resource` table and displays version mismatch.
HELP;
$this->setHelp($help);
}
开发者ID:antistatique,项目名称:n98-magerun,代码行数:8,代码来源:CompareVersionsCommand.php
示例7: configure
/**
* Setup
*
* @return void
*/
protected function configure()
{
$this->setName('giftcard:info')->addArgument('code', \Symfony\Component\Console\Input\InputArgument::REQUIRED, 'Gift card code')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->setDescription('Get gift card account information by code');
$help = <<<HELP
Get gift card account information by code
HELP;
$this->setHelp($help);
}
开发者ID:ktomk,项目名称:n98-magerun2,代码行数:13,代码来源:InfoCommand.php
示例8: configure
protected function configure()
{
$this->setName('extension:list')->setAliases(array('extension:search'))->addArgument('search', InputArgument::OPTIONAL, 'Search string')->setDescription('List magento connection extensions')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
* Requires Magento's `mage` shell script.
* Does not work with Windows as operating system.
HELP;
$this->setHelp($help);
}
开发者ID:lslab,项目名称:n98-magerun,代码行数:9,代码来源:ListExtensionsCommand.php
示例9: configure
protected function configure()
{
$this->setName('customer:list')->addArgument('search', InputArgument::OPTIONAL, 'Search query')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->setDescription('Lists customers');
$help = <<<HELP
List customers. The output is limited to 1000 (can be changed by overriding config).
If search parameter is given the customers are filtered (searchs in firstname, lastname and email).
HELP;
$this->setHelp($help);
}
开发者ID:navarr,项目名称:n98-magerun,代码行数:9,代码来源:ListCommand.php
示例10: configure
protected function configure()
{
$this->setName('db:info')->addArgument('setting', InputArgument::OPTIONAL, 'Only output value of named setting')->addDeprecatedAlias('database:info', 'Please use db:info')->setDescription('Dumps database informations')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
This command is useful to print all informations about the current configured database in app/etc/local.xml.
It can print connection string for JDBC, PDO connections.
HELP;
$this->setHelp($help);
}
开发者ID:jsiefer,项目名称:n98-magerun,代码行数:9,代码来源:InfoCommand.php
示例11: configure
protected function configure()
{
$this->setName('sys:check')->setDescription('Checks Magento System')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
- Checks missing files and folders
- Security
- PHP Extensions (Required and Bytecode Cache)
- MySQL InnoDB Engine
HELP;
$this->setHelp($help);
}
开发者ID:lslab,项目名称:n98-magerun,代码行数:11,代码来源:CheckCommand.php
示例12: configure
protected function configure()
{
$this->setName('script:repo:list')->setDescription('Lists all scripts in repository')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
You can organize your scripts in a repository.
Simply place a script in folder */usr/local/share/n98-magerun/scripts* or in your home dir
in folder *<HOME>/.n98-magerun/scripts*.
Scripts must have the file extension *.magerun*.
After that you can list all scripts with the *script:repo:list* command.
The first line of the script can contain a comment (line prefixed with #) which will be displayed as description.
\$ n98-magerun.phar script:repo:list
HELP;
$this->setHelp($help);
}
开发者ID:netz98,项目名称:n98-magerun,代码行数:17,代码来源:ListCommand.php
示例13: configure
protected function configure()
{
$this->setName('config:get')->setDescription('Get a core config item')->setHelp(<<<EOT
If <info>path</info> is not set, all available config items will be listed.
The <info>path</info> may contain wildcards (*).
If <info>path</info> ends with a trailing slash, all child items will be listed. E.g.
config:get web/
is the same as
config:get web/*
EOT
)->addArgument('path', InputArgument::OPTIONAL, 'The config path')->addOption('scope', null, InputOption::VALUE_REQUIRED, 'The config value\'s scope')->addOption('scope-id', null, InputOption::VALUE_REQUIRED, 'The config value\'s scope ID')->addOption('decrypt', null, InputOption::VALUE_NONE, 'Decrypt the config value using local.xml\'s crypt key')->addOption('update-script', null, InputOption::VALUE_NONE, 'Output as update script lines')->addOption('magerun-script', null, InputOption::VALUE_NONE, 'Output for usage with config:set')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
$help = <<<HELP
If path is not set, all available config items will be listed. path may contain wildcards (*)
HELP;
$this->setHelp($help);
}
开发者ID:brentwpeterson,项目名称:n98-magerun2,代码行数:17,代码来源:GetCommand.php
示例14: configure
protected function configure()
{
$help = <<<HELP
Supported Locales:
- cs_CZ
- ru_RU
- bg_BG
- en_US
- it_IT
- sr_RS
- sr_Cyrl_RS
- sr_Latn_RS
- pl_PL
- en_GB
- de_DE
- sk_SK
- fr_FR
- es_AR
- de_AT
HELP;
$this->setName('customer:create:dummy')->addArgument('count', InputArgument::REQUIRED, 'Count')->addArgument('locale', InputArgument::REQUIRED, 'Locale')->addArgument('website', InputArgument::OPTIONAL, 'Website')->addOption('with-addresses', null, InputOption::VALUE_NONE, 'Create dummy billing/shipping addresses for each customers')->setDescription('Generate dummy customers. You can specify a count and a locale.')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->setHelp($help);
}
开发者ID:antistatique,项目名称:n98-magerun,代码行数:23,代码来源:CreateDummyCommand.php
示例15: configure
protected function configure()
{
$this->setName('eav:attribute:list')->setDescription('Lists all EAV attributes')->addOption('filter-type', null, InputOption::VALUE_OPTIONAL, 'Filter attributes by entity type')->addOption('add-source', null, InputOption::VALUE_NONE, 'Add source models to list')->addOption('add-backend', null, InputOption::VALUE_NONE, 'Add backend type to list')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
}
开发者ID:netz98,项目名称:n98-magerun,代码行数:4,代码来源:ListCommand.php
示例16: configure
protected function configure()
{
$this->setName('hypernode:modules:list-updates')->addOption('codepool', null, InputOption::VALUE_OPTIONAL, 'Show modules in a specific codepool')->addOption('status', null, InputOption::VALUE_OPTIONAL, 'Show modules with a specific status')->addOption('vendor', null, InputOption::VALUE_OPTIONAL, 'Show modules of a specified vendor')->setDescription('Find available updates for installed modules.')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
}
开发者ID:Hypernode,项目名称:hypernode-magerun,代码行数:4,代码来源:ListUpdatesCommand.php
示例17: configure
protected function configure()
{
$this->setName('sys:store:list')->setDescription('Lists all installed store-views')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
}
开发者ID:lslab,项目名称:n98-magerun,代码行数:4,代码来源:ListCommand.php
示例18: configure
protected function configure()
{
$this->setName('dev:module:observer:list')->addArgument('type', InputArgument::OPTIONAL, 'Observer type (global, admin, frontend, crontab)')->setDescription('Lists all registered observers')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']')->addOption('sort', null, InputOption::VALUE_NONE, 'Sort by event name ascending');
}
开发者ID:antistatique,项目名称:n98-magerun,代码行数:4,代码来源:ListCommand.php
示例19: configure
protected function configure()
{
parent::configure();
$this->setName('eav:clean:attributes-and-values-without-parent')->setDescription('Remove catalog_eav_attribute and attribute values which are missing parent entry in eav_attribute')->addOption('dry-run')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
}
开发者ID:eniuz,项目名称:EAVCleaner,代码行数:5,代码来源:CleanUpAttributesAndValuesWithoutParentCommand.php
示例20: configure
protected function configure()
{
$this->setName('sys:info')->addArgument('key', InputArgument::OPTIONAL, 'Only output value of named param like "version". Key is case insensitive.')->setDescription('Prints infos about the current magento system.')->addOption('format', null, InputOption::VALUE_OPTIONAL, 'Output Format. One of [' . implode(',', RendererFactory::getFormats()) . ']');
}
开发者ID:navarr,项目名称:n98-magerun,代码行数:4,代码来源:InfoCommand.php
注:本文中的N98\Util\Console\Helper\Table\Renderer\RendererFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论