tasks/ext/phpdoc/PhpDocumentorExternalTask.php
$Id: PhpDocumentorExternalTask.php 656 2009-12-14 14:10:54Z mrook $
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.
\PhpDocumentorExternalTask
Task to run phpDocumentor with an external process
This classes uses the commandline phpdoc script to build documentation. Use this task instead of the PhpDocumentorTask when you've a clash with the Smarty libraries.
- Parent(s)
- \PhpDocumentorTask < \Task < \ProjectComponent
- Author
- Michiel Rook
- Author
- Markus Fischer
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Version
- $Id: PhpDocumentorExternalTask.php 656 2009-12-14 14:10:54Z mrook $
Properties

\PhingFile
$configDir= ''
- Type
- \PhingFile
- Inherited_from
- \PhpDocumentorTask::$configDir

string
$customtags= ''''

string
$defaultCategoryName= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$defaultCategoryName

string
$defaultPackageName= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$defaultPackageName

string
$description= ''
- Type
- string
- Inherited_from
- \Task::$description

\PhingFile
$destdir= ''
- Type
- \PhingFile
- Inherited_from
- \PhpDocumentorTask::$destdir

\PhingFile
$examplesDir= ''
- Type
- \PhingFile
- Inherited_from
- \PhpDocumentorTask::$examplesDir

array
$filesets= 'array()'

string
$ignoreTags= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$ignoreTags

bool
$ignoresymlinks= 'false'
falseDetails- Type
- bool

boolean
$javadocDesc= 'false'

boolean
$linksource= 'false'

\Location
$location= ''
- Type
- \Location
- Inherited_from
- \Task::$location

string
$output= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$output

string
$packages= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$packages

boolean
$parsePrivate= 'false'

boolean
$pear= 'false'

$programPath= ''phpdoc''
The path to the executable for phpDocumentor
'phpdoc'Details- Type

array
$projDocFilesets= 'array()'

\Project
$project= 'null'
Holds a reference to the project that a project component (a task, a target, etc.) belongs to
A reference to the current project instanceInherited from: \ProjectComponent::$project
boolean
$quiet= 'false'

\Target
$target= ''
- Type
- \Target
- Inherited_from
- \Task::$target

string
$taskName= ''
- Type
- string
- Inherited_from
- \Task::$taskName

string
$taskType= ''
- Type
- string
- Inherited_from
- \Task::$taskType

\PhingFile
$templateBase= ''
- Type
- \PhingFile
- Inherited_from
- \PhpDocumentorTask::$templateBase

string
$title= ''
- Type
- string
- Inherited_from
- \PhpDocumentorTask::$title

boolean
$undocumentedelements= 'false'

\RuntimeConfigurable
$wrapper= ''
- Type
- \RuntimeConfigurable
- Inherited_from
- \Task::$wrapper
Methods

constructArguments(
)
:
arrayConstructs an argument string for phpDocumentor
| Type | Description |
|---|---|
| array |

createProjdocfileset(
)
:
\FileSetCreates a readme/install/changelog fileset.
Inherited from: \PhpDocumentorTask::createProjdocfileset()| Type | Description |
|---|---|
| \FileSet |

findPhpDocumentorInstall(
)
:
voidSearches include_path for PhpDocumentor install and adjusts include_path appropriately.
Inherited from: \PhpDocumentorTask::findPhpDocumentorInstall()| Exception | Description |
|---|---|
| \BuildException | - if unable to find PhpDocumentor on include_path |

getLocation(
)
:
\LocationReturns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.
Inherited from: \Task::getLocation()| Type | Description |
|---|---|
| \Location | The location object describing the position of this task within the buildfile. |

getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurableReturns the wrapper object for runtime configuration
Inherited from: \Task::getRuntimeConfigurableWrapper()| Type | Description |
|---|---|
| \RuntimeConfigurable | The wrapper object used by this task |

getTaskType(
)
:
stringReturns the name of the task under which it was invoked, usually the XML tagname
Inherited from: \Task::getTaskType()| Type | Description |
|---|---|
| string | The type of this task (XML Tag) |

init(
)
:
voidOverride PhpDocumentorTask::init() because they're specific to the phpdoc API which we don't use.
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
| Exception | Description |
|---|---|
| \BuildException |

log(
string $msg, integer $level
=
Project::MSG_INFO
)
:
void
@param string $msg The message to be logged.
| Name | Type | Description |
|---|---|---|
| $msg | string | The message to log |
| $level | integer | The priority of the message |
- See
- \BuildEvent
- See
- \BuildListener

main(
)
:
voidMain entrypoint of the task
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
| Exception | Description |
|---|---|
| \BuildException | - if the phpdoc classes can't be loaded. |

maybeConfigure(
)
:
voidConfigure this task if it hasn't been done already.
Inherited from: \Task::maybeConfigure()
setConfigdir(
\PhingFile $d
)
:
voidSet a directory to search for configuration files in.
Inherited from: \PhpDocumentorTask::setConfigdir()| Name | Type | Description |
|---|---|---|
| $d | \PhingFile |

setCustomtags(
string $sCustomtags
)
:
voidcustom tags, will be recognized and put in tags[] instead of unknowntags[].
Inherited from: \PhpDocumentorTask::setCustomtags()| Name | Type | Description |
|---|---|---|
| $sCustomtags | string |

setDefaultcategoryname(
string $name
)
:
voidSets the default category name.
Inherited from: \PhpDocumentorTask::setDefaultcategoryname()| Name | Type | Description |
|---|---|---|
| $name | string |

setDescription(
string $desc
)
:
void
| Name | Type | Description |
|---|---|---|
| $desc | string | The text describing the task |

setDestdir(
$destdir
)
:
voidSet the destination directory for the generated documentation
Inherited from: \PhpDocumentorTask::setDestdir()| Name | Type | Description |
|---|---|---|
| $destdir |

setExamplesdir(
\PhingFile $d
)
:
voidSet a directory to search for examples in.
Inherited from: \PhpDocumentorTask::setExamplesdir()| Name | Type | Description |
|---|---|---|
| $d | \PhingFile |

setIgnoresymlinks(
bool $bSet
)
:
voidIgnore symlinks to other files or directories.
| Name | Type | Description |
|---|---|---|
| $bSet | bool |

setIgnoretags(
string $tags
)
:
voidSet (comma-separated) list of tags to ignore.
Inherited from: \PhpDocumentorTask::setIgnoretags()| Name | Type | Description |
|---|---|---|
| $tags | string |

setJavadocdesc(
$javadoc
)
:
voidWhether to use javadoc descriptions (more primitive).
Inherited from: \PhpDocumentorTask::setJavadocdesc()| Name | Type | Description |
|---|---|---|
| $javadoc | boolean |

setLinksource(
$b
)
:
voidSet whether to generate sourcecode for each file parsed
Inherited from: \PhpDocumentorTask::setLinksource()| Name | Type | Description |
|---|---|---|
| $b | boolean |

setLocation(
\Location $location
)
:
voidSets the location within the buildfile this task occurs. Called by the parser to set location information.
Inherited from: \Task::setLocation()| Name | Type | Description |
|---|---|---|
| $location | \Location | The location object describing the position of this task within the buildfile. |

setOutput(
string $output
)
:
voidSet the output format (e.g. HTML:Smarty:PHP).
Inherited from: \PhpDocumentorTask::setOutput()| Name | Type | Description |
|---|---|---|
| $output | string |

setOwningTarget(
\Target $target
)
:
void
| Name | Type | Description |
|---|---|---|
| $target | \Target | Reference to owning target |

setPackageoutput(
string $packages
)
:
voidSet (comma-separated) list of packages to output.
Inherited from: \PhpDocumentorTask::setPackageoutput()| Name | Type | Description |
|---|---|---|
| $packages | string |

setParseprivate(
$parseprivate
)
:
voidShould private members/classes be documented
Inherited from: \PhpDocumentorTask::setParseprivate()| Name | Type | Description |
|---|---|---|
| $parseprivate | boolean |

setPhpDocumentorOptions(
\PhingPhpDocumentorSetup $phpdoc
)
:
voidSets the options on the passed-in phpdoc setup object.
Inherited from: \PhpDocumentorTask::setPhpDocumentorOptions()| Name | Type | Description |
|---|---|---|
| $phpdoc | \PhingPhpDocumentorSetup |

setProgramPath(
$programPath
)
:
voidSets the path to the phpDocumentor executable
| Name | Type | Description |
|---|---|---|
| $programPath |

setProject(
\Project $project
)
:
voidReferences the project to the current component.
Inherited from: \ProjectComponent::setProject()| Name | Type | Description |
|---|---|---|
| $project | \Project | The reference to the current project |

setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
voidSets the wrapper object this task should use for runtime configurable elements.
Inherited from: \Task::setRuntimeConfigurableWrapper()| Name | Type | Description |
|---|---|---|
| $wrapper | \RuntimeConfigurable | The wrapper object this task should use |

setSourcecode(
$b
)
:
voidSet whether to generate sourcecode for each file parsed
Inherited from: \PhpDocumentorTask::setSourcecode()| Name | Type | Description |
|---|---|---|
| $b | boolean |

setSourcepath(
$sourcepath
)
:
voidSet the source path. A directory or a comma separate list of directories.
| Name | Type | Description |
|---|---|---|
| $sourcepath |

setTaskName(
$name
)
:
string
| Name | Type | Description |
|---|---|---|
| $name |
| Type | Description |
|---|---|
| string | A string representing the name of this task for log |

setTaskType(
string $name
)
:
voidSets the type of the task. Usually this is the name of the XML tag
Inherited from: \Task::setTaskType()| Name | Type | Description |
|---|---|---|
| $name | string | The type of this task (XML Tag) |

setTemplateBase(
$oTemplateBase
)
:
voidSet base location of all templates for this parse.
Inherited from: \PhpDocumentorTask::setTemplateBase()| Name | Type | Description |
|---|---|---|
| $oTemplateBase |

setTitle(
$title
)
:
voidSet the title for the generated documentation
Inherited from: \PhpDocumentorTask::setTitle()| Name | Type | Description |
|---|---|---|
| $title |

setUndocumentedelements(
boolean $b
)
:
voidControl whether or not warnings will be shown for undocumented elements.
Inherited from: \PhpDocumentorTask::setUndocumentedelements()Useful for identifying classes and methods that haven't yet been documented.
| Name | Type | Description |
|---|---|---|
| $b | boolean |

validate(
)
:
voidValidates that necessary minimum options have been set. Based on PhpDocumentorTask::validate().
| Exception | Description |
|---|---|
| \BuildException | if validation doesn't pass |