Skip to content

Instantly share code, notes, and snippets.

@madflow
Created February 6, 2012 21:50
Show Gist options
  • Save madflow/1755148 to your computer and use it in GitHub Desktop.
Save madflow/1755148 to your computer and use it in GitHub Desktop.
<?php
class MatrixGenerateOption extends Custom_TaskOptionAbstract
{
protected function configure()
{
$this->addArgument('config', self::ARG_TYPE_FILE, 'The config file.', true);
$this->addArgument('dir', self::ARG_TYPE_STRING, 'The output directory.', true);
$this->addArgument('file', self::ARG_TYPE_STRING, 'The output filename.', true);
$this->addArgument('metanames', self::ARG_TYPE_FILE, 'The metaname file in text format.', true);
$this->addArgument('offset', self::ARG_TYPE_INT, 'The offset where to start. Defaults to 1.', false);
$this->addArgument('limit', self::ARG_TYPE_INT, 'Limit the interations over the metanames. Defaults to 0.', false);
$this->addArgument('performance', self::ARG_TYPE_VOID, 'Performance mode. Profiler disabled and no screen "echos" Supply with no arguments.', false);
}
public function run(array $parsedArguments)
{
// $parsedArguments enthält alle validen Argument
$config = $parsedArguments['config'];
// ...
}
public function getDescription()
{
return 'Matrix generieren';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment