/** * Initializes this command and sets the name, description, options and * arguments. * * @return void */ protected function configure() { // minimization of the following expression $VALUE_OPTIONAL_ARRAY = InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY; $this->setAliases(array('parse'))->setDescription($this->__('PPCPP-DESCRIPTION'))->setHelp($this->__('PPCPP-HELPTEXT'))->addOption('filename', 'f', $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-FILENAME'))->addOption('directory', 'd', $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-DIRECTORY'))->addOption('target', 't', InputOption::VALUE_OPTIONAL, $this->__('PPCPP:OPT-TARGET'))->addOption('encoding', null, InputOption::VALUE_OPTIONAL, $this->__('PPCPP:OPT-ENCODING'))->addOption('extensions', 'e', $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-EXTENSIONS'))->addOption('ignore', 'i', $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-IGNORE'))->addOption('ignore-tags', null, $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-IGNORETAGS'))->addOption('hidden', null, InputOption::VALUE_NONE, $this->__('PPCPP:OPT-HIDDEN'))->addOption('ignore-symlinks', null, InputOption::VALUE_NONE, $this->__('PPCPP:OPT-IGNORESYMLINKS'))->addOption('markers', 'm', $VALUE_OPTIONAL_ARRAY, $this->__('PPCPP:OPT-MARKERS'), array('TODO', 'FIXME'))->addOption('title', null, InputOption::VALUE_OPTIONAL, $this->__('PPCPP:OPT-TITLE'))->addOption('force', null, InputOption::VALUE_NONE, $this->__('PPCPP:OPT-FORCE'))->addOption('validate', null, InputOption::VALUE_NONE, $this->__('PPCPP:OPT-VALIDATE'))->addOption('visibility', null, InputOption::VALUE_OPTIONAL, $this->__('PPCPP:OPT-VISIBILITY'))->addOption('sourcecode', null, InputOption::VALUE_NONE, $this->__('PPCPP:OPT-SOURCECODE'))->addOption('progressbar', 'p', InputOption::VALUE_NONE, $this->__('PPCPP:OPT-PROGRESSBAR'))->addOption('parseprivate', null, InputOption::VALUE_NONE, 'PPCPP:OPT-PARSEPRIVATE')->addOption('defaultpackagename', null, InputOption::VALUE_OPTIONAL, $this->__('PPCPP:OPT-DEFAULTPACKAGENAME'), 'Default'); parent::configure(); }
/** * Initializes this command and sets the name, description, options and * arguments. * * @return void */ protected function configure() { $this->setName('project:parse')->setAliases(array('parse'))->setDescription('Creates a structure file from your source code')->setHelp(<<<HELP The parse task uses the source files defined either by -f or -d options and generates a structure file (structure.xml) at the target location. HELP )->addOption('target', 't', InputOption::VALUE_OPTIONAL, 'Path where to store the generated output')->addOption('filename', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of files to parse. The wildcards ? and * ' . 'are supported')->addOption('directory', 'd', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of directories to (recursively) parse')->addOption('extensions', 'e', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of extensions to parse, defaults to ' . 'php, php3 and phtml')->addOption('ignore', 'i', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of file(s) and directories that will be ' . 'ignored. Wildcards * and ? are supported')->addOption('ignore-tags', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of tags that will be ignored, defaults to ' . 'none. package, subpackage and ignore may not be ignored.')->addOption('hidden', null, InputOption::VALUE_NONE, 'set to on to descend into hidden directories ' . '(directories starting with \'.\'), default is on')->addOption('ignore-symlinks', null, InputOption::VALUE_NONE, 'Ignore symlinks to other files or directories, default is on')->addOption('markers', 'm', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of markers/tags to filter', array('TODO', 'FIXME'))->addOption('title', null, InputOption::VALUE_OPTIONAL, 'Sets the title for this project; default is the phpDocumentor ' . 'logo')->addOption('force', null, InputOption::VALUE_NONE, 'Forces a full build of the documentation, does not increment ' . 'existing documentation')->addOption('validate', null, InputOption::VALUE_NONE, 'Validates every processed file using PHP Lint, costs a lot of ' . 'performance')->addOption('visibility', null, InputOption::VALUE_OPTIONAL, 'Specifies the parse visibility that should be displayed in the ' . 'documentation (comma seperated e.g. "public,protected")')->addOption('defaultpackagename', null, InputOption::VALUE_OPTIONAL, 'Name to use for the default package.', 'Default')->addOption('sourcecode', null, InputOption::VALUE_NONE, 'Whether to include syntax highlighted source code')->addOption('progressbar', 'p', InputOption::VALUE_NONE, 'Whether to show a progress bar; will automatically quiet logging ' . 'to stdout'); parent::configure(); }
/** * Initializes this command and sets the name, description, options and * arguments. * * @return void */ protected function configure() { $this->setAliases(array('transform'))->setDescription('Converts the PHPDocumentor structure file to documentation')->setHelp(<<<TEXT This task will execute the transformation rules described in the given template (defaults to 'responsive') with the given source (defaults to output/structure.xml) and writes these to the target location (defaults to 'output'). It is possible for the user to receive additional information using the verbose option or stop additional information using the quiet option. Please take note that the quiet option also disables logging to file. TEXT ); $this->addOption('source', 's', InputOption::VALUE_OPTIONAL, 'Path where the XML source file is located (optional)'); $this->addOption('target', 't', InputOption::VALUE_OPTIONAL, 'Path where to store the generated output (optional)'); $this->addOption('template', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Name of the template to use (optional)'); $this->addOption('progressbar', 'p', InputOption::VALUE_NONE, 'Whether to show a progress bar; will automatically quiet logging to stdout'); parent::configure(); }
/** * Initializes this command and sets the name, description, options and * arguments. * * @return void */ protected function configure() { $this->setName('project:run')->setAliases(array('run'))->setDescription('Parses and transforms the given files to a specified location')->setHelp(<<<HELP phpDocumentor creates documentation from PHP source files. The simplest way to use it is: <info>\$ phpdoc run -d [directory to parse] -t [output directory]</info> This will parse every file ending with .php, .php3 and .phtml in <directory to parse> and then output a HTML site containing easily readable documentation in <output directory>. phpDocumentor will try to look for a phpdoc.dist.xml or phpdoc.xml file in your current working directory and use that to override the default settings if present. In the configuration file can you specify the same settings (and more) as the command line provides. <comment>Other commands</comment> In addition to this command phpDocumentor also supports additional commands: <comment>Available commands:</comment> <info> help list parse run transform <comment>project</comment> project:parse project:run project:transform <comment>template</comment> template:generate template:list template:package</info> You can get a more detailed listing of the commands using the <info>list</info> command and get help by prepending the word <info>help</info> to the command name. HELP )->addOption('target', 't', InputOption::VALUE_OPTIONAL, 'Path where to store the generated output')->addOption('filename', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of files to parse. The wildcards ? and * ' . 'are supported')->addOption('directory', 'd', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of directories to (recursively) parse')->addOption('extensions', 'e', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of extensions to parse, defaults to ' . 'php, php3 and phtml')->addOption('ignore', 'i', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of file(s) and directories that will be ' . 'ignored. Wildcards * and ? are supported')->addOption('ignore-tags', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of tags that will be ignored, defaults to ' . 'none. package, subpackage and ignore may not be ignored.')->addOption('hidden', null, InputOption::VALUE_NONE, 'set to on to descend into hidden directories ' . '(directories starting with \'.\'), default is on')->addOption('ignore-symlinks', null, InputOption::VALUE_NONE, 'Ignore symlinks to other files or directories, default is on')->addOption('markers', 'm', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Comma-separated list of markers/tags to filter', array('TODO', 'FIXME'))->addOption('title', null, InputOption::VALUE_OPTIONAL, 'Sets the title for this project; default is the phpDocumentor ' . 'logo')->addOption('force', null, InputOption::VALUE_NONE, 'Forces a full build of the documentation, does not increment ' . 'existing documentation')->addOption('validate', null, InputOption::VALUE_NONE, 'Validates every processed file using PHP Lint, costs a lot of ' . 'performance')->addOption('visibility', null, InputOption::VALUE_OPTIONAL, 'Specifies the parse visibility that should be displayed in the ' . 'documentation (comma seperated e.g. "public,protected")')->addOption('defaultpackagename', null, InputOption::VALUE_OPTIONAL, 'Name to use for the default package.', 'Default')->addOption('sourcecode', null, InputOption::VALUE_NONE, 'Whether to include syntax highlighted source code')->addOption('progressbar', 'p', InputOption::VALUE_NONE, 'Whether to show a progress bar; will automatically quiet logging ' . 'to stdout')->addOption('template', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Name of the template to use (optional)')->addOption('parseprivate', null, InputOption::VALUE_NONE, 'Whether to parse DocBlocks marked with @internal tag'); parent::configure(); }