
Public Member Functions | |
| parseType ($typeName, $fileName) | |
| Creates a type object out of documentation. | |
| addMembers (spunQ_LocalUserType $type, $fileName) | |
| Adds members to a type object. | |
Static Public Member Functions | |
| static | parseDocumentation ($doc) |
| Will bring a doc-comment to a usable form. | |
Protected Member Functions | |
| verifyMemberOptions (spunQ_LocalUserType $owner, $name, $options) | |
| Verifies that valid member options are provided. | |
Private Member Functions | |
| findClassName ($typeName, $fileName) | |
| Tries to find the name of the class name of a local type. | |
| getTypeName ($tags, $typeName) | |
| Determines the actual name of a type. | |
| getParentType ($class) | |
| Retrieves the parent type of a type. | |
Static Private Member Functions | |
| static | append (&$text, &$tags, &$currentTag, &$currentText) |
| Will append the current text to the appropriate element. | |
Although the file is passed as argument to the inherited functions, it is only used to determine the name of the type to be extracted.
Definition at line 20 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::addMembers | ( | spunQ_LocalUserType $ | type, | |
| $ | fileName | |||
| ) |
Adds members to a type object.
Since it is not possible to parse types and their members in a single step due to possible circular dependencies (a parent has a child, a child has a parent), the members of a type are added after all types have been declared.
| $type | A type that was created using parseType(). | |
| $fileName | The file in which the type was defined. |
Implements spunQ_ITypeParser.
Definition at line 54 of file ReflectionTypeParser.class.php.
| static spunQ_ReflectionTypeParser::append | ( | &$ | text, | |
| &$ | tags, | |||
| &$ | currentTag, | |||
| &$ | currentText | |||
| ) | [static, private] |
Will append the current text to the appropriate element.
This function is required by parseDocumentation() and will be called whenever a new line is encountered that starts with @.
| $text | The text to set if $currentTag is NULL. | |
| $tags | The tags to expand with the given text. | |
| $currentTag | The tag we're currently appending information to. Can be NULL, which means currentText will be appended to the $text. | |
| $currentText | array of lines that will be assembled to form the final text. This variable will be set to the empty array. |
Definition at line 156 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::findClassName | ( | $ | typeName, | |
| $ | fileName | |||
| ) | [private] |
Tries to find the name of the class name of a local type.
| $typeName | Name of the type to search class for. | |
| $fileName | The file in which the type was defined. |
Definition at line 127 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::getParentType | ( | $ | class | ) | [private] |
Retrieves the parent type of a type.
| $class | A ReflectionClass object describing the class used for the type. |
| spunQ.FrameworkError | If the $class is not an instance of DataObject. |
Definition at line 249 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::getTypeName | ( | $ | tags, | |
| $ | typeName | |||
| ) | [private] |
Determines the actual name of a type.
The name of the type is either the name of the class, or a value passed in the documentation tags.
| $tags | an associative array mapping tag names to their string values. | |
| $typeName | The name of the type. |
Definition at line 236 of file ReflectionTypeParser.class.php.
| static spunQ_ReflectionTypeParser::parseDocumentation | ( | $ | doc | ) | [static] |
Will bring a doc-comment to a usable form.
| $doc | A doc-comment (a multiline comment starting with /**). Leading stars and whitespaces are stripped from the comment. |
Definition at line 179 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::parseType | ( | $ | typeName, | |
| $ | fileName | |||
| ) |
Creates a type object out of documentation.
| $typeName | The proposed name for the type. The actual type name can be different, if one is provided in a @name tag in the class documentation. | |
| $fileName | File containing the source code for a type. This file must be named X.class.php where X is the name of a class that is declared in this file. The filename can optionally be prepended with the unique name of the module. Example: The file 'Test.class.php' is expected to contain the declaration of the class 'Test'. It might have as well been called 'myModule_Test.class.php', if the class was defined in the myModule module. |
| spunQ_TypeNotFoundException | When the parent type was not found. |
Implements spunQ_ITypeParser.
Definition at line 25 of file ReflectionTypeParser.class.php.
| spunQ_ReflectionTypeParser::verifyMemberOptions | ( | spunQ_LocalUserType $ | owner, | |
| $ | name, | |||
| $ | options | |||
| ) | [protected] |
Verifies that valid member options are provided.
| $owner | The type the member is a part of. | |
| $name | Name of the member. | |
| $options | The options to check. |
Definition at line 101 of file ReflectionTypeParser.class.php.
1.5.9