src/DocBlox/Plugin/Core/Parser/DocBlock/Validator/File.php
File contains the DocBlox_Core_Validator_File class
PHP Version 5
- Author
- Ben Selby
- Author
- Mike van Riel
- Category
- DocBlox
- Copyright
- 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- License
- MIT
- Link
- http://docblox-project.org
- Package
- Parser
- Subpackage
- DocBlock_Validators
\DocBlox_Plugin_Core_Parser_DocBlock_Validator_File
This class is responsible for validating the file docbloc
- Parent(s)
- \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Class < \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract < \DocBlox_Parser_Abstract
- Author
- Ben Selby
- Author
- Mike van Riel
- Category
- DocBlox
- Copyright
- 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)
- License
- MIT
- Link
- http://docblox-project.org
Properties
\DocBlox_Reflection_DocBlock
$_docblock= ''
Docblock for the file.
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_docblock
string
$_entityName= ''
Name of the "entity" being validated.
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_entityName- Type
- \string
- Inherited_from
- \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_entityName
int
$_lineNumber= ''
Line number of the docblock
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_lineNumber- Type
- \int
- Inherited_from
- \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_lineNumber
array
$_options= ''
Array of options that may or may not be used whilst validating
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_options- Type
- \array
- Inherited_from
- \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_options
\DocBlox_Reflection_Abstract
$_source= ''
Source element of the DocBlock.
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::$_source
\sfEventDispatcher|null
$event_dispatcher= 'null'
The event dispatcher object, may be null to not dispatch events.
Inherited from: \DocBlox_Parser_Abstract::$event_dispatchernullDetails- Type
- \sfEventDispatcher | \null
- Inherited_from
- \DocBlox_Parser_Abstract::$event_dispatcher
Methods
__construct(
\string $name, \int $lineNumber, \DocBlox_Reflection_DocBlock | \null $docblock
=
null, \DocBlox_Reflection_Abstract | \null $source
=
null
)
:
voidConstructor
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::__construct()| Name | Type | Description |
|---|---|---|
| $name | \string | Name of the "entity" |
| $lineNumber | \int | Line number for |
| $docblock | \DocBlox_Reflection_DocBlock | \null | Docblock |
| $source | \DocBlox_Reflection_Abstract | \null | Source Element. |
debug(
\string $message
)
:
\voidDispatches a logging request to log a debug message.
Inherited from: \DocBlox_Parser_Abstract::debug()| Name | Type | Description |
|---|---|---|
| $message | \string | The message to log. |
dispatch(
\string $name, \string[] $arguments
)
:
\mixed | \nullDispatches an event to the Event Dispatcher.
Inherited from: \DocBlox_Parser_Abstract::dispatch()This method tries to dispatch an event; if no Event Dispatcher has been set than this method will explicitly not fail and return null.
By not failing we make the Event Dispatcher optional and is it easier for people to re-use this component in their own application.
| Name | Type | Description |
|---|---|---|
| $name | \string | Name of the event to dispatch. |
| $arguments | \string[] | Arguments for this event. |
| Type | Description |
|---|---|
| \mixed | \null |
| Exception | Description |
|---|---|
| \DocBlox_Parser_Exception | if there is a dispatcher but it is not of type sfEventDispatcher |
isValid(
)
:
\booleanIs the docblock valid?
| Type | Description |
|---|---|
| \boolean |
- See
- \DocBlox_Parser_DocBlock_Validator::isValid()
log(
\string $message, \int $priority
=
6
)
:
\void
| Name | Type | Description |
|---|---|---|
| $message | \string | The message to log. |
| $priority | \int | The logging priority, the lower, the more important. Ranges from 1 to 7 |
logParserError(
\string $type, \string $message, \string $line
)
:
\voidDispatches a parser error to be logged.
Inherited from: \DocBlox_Parser_Abstract::logParserError()| Name | Type | Description |
|---|---|---|
| $type | \string | The logging priority as string |
| $message | \string | The message to log. |
| $line | \string | The line number where the error occurred.. |
setOptions(
\array $options
)
:
\voidSet the options that may be used whilst validating the docblocks.
Inherited from: \DocBlox_Plugin_Core_Parser_DocBlock_Validator_Abstract::setOptions()Can contain configuration as long as each validator knows how to interrogate it
| Name | Type | Description |
|---|---|---|
| $options | \array | Options that may be used during validation |