src/DocBlox/Reflection/File.php
DocBlox
PHP Version 5
- 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
- Reflection
Constants
\DocBlox_Reflection_File
Reflection class for a full file.
- Parent(s)
- \DocBlox_Reflection_DocBlockedAbstract < \DocBlox_Reflection_Abstract
- Author
- Mike van Riel
- Category
- DocBlox
- License
- MIT
- Link
- http://docblox-project.org
Properties
\string[] $_token_method_cache = array()Stores the method name of the processing method for a token.
Inherited from: \DocBlox_Reflection_Abstract::$$_token_method_cache\DocBlox_Reflection_DocBlockedAbstract::$$_token_method_cacheThe generation of method names may be a performance costly task and is quite often executed. As such we cache the method names which are coming from tokens here in this array.
array()Details- Type
- \string[]
- Inherited_from
- \DocBlox_Reflection_Abstract::$$_token_method_cache
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$_token_method_cache
string $active_namespace = 'default''default'Details- Type
- string
\DocBlox_Reflection_Constant[] $constants = array()array()Details
$default_package_name = 'Default''Default'Details- Type
- n/a
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$default_package_name
\DocBlox_Reflection_DocBlock|null $doc_block = nullnullDetails- Type
- \DocBlox_Reflection_DocBlock | null
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$doc_block
\sfEventDispatcher|null $event_dispatcher = nullThe event dispatcher object, may be null to not dispatch events.
Inherited from: \DocBlox_Reflection_Abstract::$$event_dispatcher\DocBlox_Reflection_DocBlockedAbstract::$$event_dispatchernullDetails- Type
- \sfEventDispatcher | null
- Inherited_from
- \DocBlox_Reflection_Abstract::$$event_dispatcher
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$event_dispatcher
string $filename = ''''Details- Type
- string
- Inherited_from
- \DocBlox_Reflection_Abstract::$$filename
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$filename
\DocBlox_Reflection_Function[] $functions = array()array()Details
string|null $hash = nullnullDetails- Type
- string | null
\DocBlox_Reflection_Include[] $includes = array()array()Details
\DocBlox_Reflection_Interface[] $interfaces = array()array()Details
int $line_start = 0Stores the line where the initial token was found.
Inherited from: \DocBlox_Reflection_Abstract::$$line_start\DocBlox_Reflection_DocBlockedAbstract::$$line_start0Details- Type
- int
- Inherited_from
- \DocBlox_Reflection_Abstract::$$line_start
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$line_start
\string[] $marker_terms = array('TODO', 'FIXME')array('TODO', 'FIXME')Details- Type
- \string[]
\string[] $markers = array()array()Details- Type
- \string[]
string $name = 'Unknown'Stores the name for this Reflection object.
Inherited from: \DocBlox_Reflection_Abstract::$$name\DocBlox_Reflection_DocBlockedAbstract::$$name'Unknown'Details- Type
- string
- Inherited_from
- \DocBlox_Reflection_Abstract::$$name
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$name
string $namespace = 'default'Stores the name of the namespace to which this belongs.
Inherited from: \DocBlox_Reflection_Abstract::$$namespace\DocBlox_Reflection_DocBlockedAbstract::$$namespace'default'Details- Type
- string
- Inherited_from
- \DocBlox_Reflection_Abstract::$$namespace
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$namespace
\string[] $namespace_aliases = array()Stores the aliases and full names of any defined namespace alias (T_USE).
Inherited from: \DocBlox_Reflection_Abstract::$$namespace_aliases\DocBlox_Reflection_DocBlockedAbstract::$$namespace_aliasesarray()Details- Type
- \string[]
- Inherited_from
- \DocBlox_Reflection_Abstract::$$namespace_aliases
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$namespace_aliases
\string[] $parse_markers = array()array()Details- Type
- \string[]
int $token_end = 0Stores the end position by token index.
Inherited from: \DocBlox_Reflection_Abstract::$$token_end\DocBlox_Reflection_DocBlockedAbstract::$$token_end0Details- Type
- int
- Inherited_from
- \DocBlox_Reflection_Abstract::$$token_end
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$token_end
int $token_start = 0Stores the start position by token index.
Inherited from: \DocBlox_Reflection_Abstract::$$token_start\DocBlox_Reflection_DocBlockedAbstract::$$token_start0Details- Type
- int
- Inherited_from
- \DocBlox_Reflection_Abstract::$$token_start
- Inherited_from
- \DocBlox_Reflection_DocBlockedAbstract::$$token_start
Methods
__construct(string $file, boolean $validate = false) : voidOpens the file and retrieves its contents.
During construction the given file is checked whether it is readable and if the $validate argument is true a PHP Lint action is executed to check whether the there are no parse errors.
By default the Lint check is disable because of the performance hit introduced by this action.
If the validation checks out the file's contents are read; converted to UTF-8 and the has is created from those contents.
| Name | Type | Description |
|---|---|---|
| $file | string | Name of the file. |
| $validate | boolean | Whether to check the file using PHP Lint. |
| Exception | Description |
|---|---|
| \DocBlox_Reflection_Exception | when the filename is incorrect or the file can not be opened |
__toString() : stringDefault behavior of the toString method is to return the name of this reflection.
Inherited from: \DocBlox_Reflection_Abstract::__toString()\DocBlox_Reflection_DocBlockedAbstract::__toString()| Type | Description |
|---|---|
| string |
_detectEncodingFallback(string $string) : stringThis is a fallback mechanism to detect the encoding of a string; if no finfo or mbstring extension is present then this is used.
WARNING: try to prevent this; it is assumed that this method is not fool-proof nor performing as well as the other options.
| Name | Type | Description |
|---|---|---|
| $string | string | String to detect the encoding of. |
| Type | Description |
|---|---|
| string | Name of the encoding to return. |
addMarker(string $name) : voidAdds a marker to scan the contents of this file for.
| Name | Type | Description |
|---|---|---|
| $name | string | The Marker term, i.e. FIXME or TODO. |
addParserMarker(\sfEvent $data) : voidAdds a parse error to the system
| Name | Type | Description |
|---|---|---|
| $data | \sfEvent | The event containing the marker details. |
convertToUtf8(string $filename, string $contents) : stringConverts a piece of text to UTF-8 if it isn't.
This method tries to detect the encoding of the given string when necessary using the finfo extension (packaged with PHP 5.3 by default; available as extension before that) and then uses iconv to convert the contents from the found encoding to UTF-8.
If the finfo class is not available we try to detect the encoding using the mbstring extension and if that isn't available then we try to brute-force detect the encoding using iconv.
If the encoding does not register as UTF-8 we try to re-encode to UTF-8; if that fails the original content is returned and en error is logged.
| Name | Type | Description |
|---|---|---|
| $filename | string | Path to the file; finfo directly reads the file instead of the contents. |
| $contents | string | File's contents to convert. |
| Type | Description |
|---|---|
| string |
debug(string $message) : voidDispatches a logging request to log a debug message.
Inherited from: \DocBlox_Reflection_Abstract::debug()\DocBlox_Reflection_DocBlockedAbstract::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_Reflection_Abstract::dispatch()\DocBlox_Reflection_DocBlockedAbstract::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 |
expandType(string $type, bool $ignore_non_objects = false) : stringTries to expand a type to it's full namespaced equivalent.
Inherited from: \DocBlox_Reflection_DocBlockedAbstract::expandType()| Name | Type | Description |
|---|---|---|
| $type | string | Type to expand into full namespaced equivalent. |
| $ignore_non_objects | bool | whether to ignore reserved words, when false it will not expand a set of keywords. |
| Type | Description |
|---|---|
| string |
findAbstract(\DocBlox_Reflection_TokenIterator $tokens) : \DocBlox_Reflection_Token | nullDetermine whether this token has the abstract keyword.
Inherited from: \DocBlox_Reflection_Abstract::findAbstract()\DocBlox_Reflection_DocBlockedAbstract::findAbstract()Please note that the iterator cursor does not change due to this method
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_Token | null |
findDefault(\DocBlox_Reflection_TokenIterator $tokens) : string | nullFind the Default value for this object.
Inherited from: \DocBlox_Reflection_Abstract::findDefault()\DocBlox_Reflection_DocBlockedAbstract::findDefault()Usually used with variables or arguments. Please note that the iterator cursor does not change due to this method
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
| Type | Description |
|---|---|
| string | null |
findDocBlock(\DocBlox_Reflection_TokenIterator $tokens) : \DocBlox_Reflection_DocBlock | nullTries to find the DocBlox belonging to this file (page-level DocBlock).
A page level DocBlock is a DocBlock that is at the top of a file and is not directly followed by a class definition. Page level DocBlocks MUST contain a @package tag or they are 'disqualified'.
If no page level docblox is found we throw a warning to indicate to the user that this is missing.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Token array to parse. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_DocBlock | null |
findFinal(\DocBlox_Reflection_TokenIterator $tokens) : \DocBlox_Reflection_Token | nullDetermine whether this token has the final keyword.
Inherited from: \DocBlox_Reflection_Abstract::findFinal()\DocBlox_Reflection_DocBlockedAbstract::findFinal()Please note that the iterator cursor does not change due to this method
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_Token | null |
findStatic(\DocBlox_Reflection_TokenIterator $tokens) : \DocBlox_Reflection_Token | nullDetermine whether this token has the static keyword.
Inherited from: \DocBlox_Reflection_Abstract::findStatic()\DocBlox_Reflection_DocBlockedAbstract::findStatic()Please note that the iterator cursor does not change due to this method
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_Token | null |
findType(\DocBlox_Reflection_TokenIterator $tokens) : string | nullFind the Type for this object.
Inherited from: \DocBlox_Reflection_Abstract::findType()\DocBlox_Reflection_DocBlockedAbstract::findType()Please note that the iterator cursor does not change due to this method
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
| Type | Description |
|---|---|
| string | null |
findVisibility(\DocBlox_Reflection_TokenIterator $tokens) : stringSearches for visibility specifiers with the current token.
Inherited from: \DocBlox_Reflection_Abstract::findVisibility()\DocBlox_Reflection_DocBlockedAbstract::findVisibility()| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Token iterator to search in. |
| Type | Description |
|---|---|
| string | public|private|protected |
getClass(string $name) : \DocBlox_Reflection_Class | nullReturns the class object with the given name.
| Name | Type | Description |
|---|---|---|
| $name | string | Name of the requested class. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_Class | null |
getClasses() : \DocBlox_Reflection_ClassReturns all classes in this file.
| Type | Description |
|---|---|
| \DocBlox_Reflection_Class |
getConstants() : \DocBlox_Reflection_ConstantsReturns all constants in this file.
| Type | Description |
|---|---|
| \DocBlox_Reflection_Constants |
getDefaultPackageName() : stringReturns the name of the default package.
Inherited from: \DocBlox_Reflection_DocBlockedAbstract::getDefaultPackageName()| Type | Description |
|---|---|
| string |
getDocBlock() : \DocBlox_Reflection_Docblock | nullReturns the DocBlock reflection object.
Inherited from: \DocBlox_Reflection_DocBlockedAbstract::getDocBlock()| Type | Description |
|---|---|
| \DocBlox_Reflection_Docblock | null |
getEndTokenId() : intReturns the token id which identifies the end of the object.
Inherited from: \DocBlox_Reflection_Abstract::getEndTokenId()\DocBlox_Reflection_DocBlockedAbstract::getEndTokenId()| Type | Description |
|---|---|
| int |
getFilename() : stringReturns the name of the file to which this element is related.
Inherited from: \DocBlox_Reflection_Abstract::getFilename()\DocBlox_Reflection_DocBlockedAbstract::getFilename()| Type | Description |
|---|---|
| string |
getFunctions() : \DocBlox_Reflection_FunctionReturns all functions in this file.
| Type | Description |
|---|---|
| \DocBlox_Reflection_Function |
getIncludes() : \DocBlox_Reflection_ConstantsReturns all constants in this file.
| Type | Description |
|---|---|
| \DocBlox_Reflection_Constants |
getInterfaces() : \DocBlox_Reflection_InterfaceReturns all Interfaces in this file.
| Type | Description |
|---|---|
| \DocBlox_Reflection_Interface |
getLineNumber() : intReturns the line number where this token starts.
Inherited from: \DocBlox_Reflection_Abstract::getLineNumber()\DocBlox_Reflection_DocBlockedAbstract::getLineNumber()| Type | Description |
|---|---|
| int |
getName() : stringReturns the name for this Reflection object.
Inherited from: \DocBlox_Reflection_Abstract::getName()\DocBlox_Reflection_DocBlockedAbstract::getName()| Type | Description |
|---|---|
| string |
getNamespace() : stringReturns the name of the namespace to which this belongs.
Inherited from: \DocBlox_Reflection_Abstract::getNamespace()\DocBlox_Reflection_DocBlockedAbstract::getNamespace()| Type | Description |
|---|---|
| string |
getNamespaceAliases() : \string[]Returns the namespace aliases which can be applied to the types in this object.
Inherited from: \DocBlox_Reflection_Abstract::getNamespaceAliases()\DocBlox_Reflection_DocBlockedAbstract::getNamespaceAliases()| Type | Description |
|---|---|
| \string[] |
getStartTokenId() : intGetter; returns the token id which identifies the start of this object.
Inherited from: \DocBlox_Reflection_Abstract::getStartTokenId()\DocBlox_Reflection_DocBlockedAbstract::getStartTokenId()| Type | Description |
|---|---|
| int |
initializeTokens(string $contents, string $filename = null) : \DocBlox_Reflection_TokenIteratorExtracts all tokens from this file and initializes the iterator used to walk through this file.
| Name | Type | Description |
|---|---|---|
| $contents | string | The text to parse into tokens. |
| $filename | string | The path of this file, if present. |
| Type | Description |
|---|---|
| \DocBlox_Reflection_TokenIterator |
log(string $message, int $priority = 6) : voidDispatches a logging request.
Inherited from: \DocBlox_Reflection_Abstract::log()\DocBlox_Reflection_DocBlockedAbstract::log()| Name | Type | Description |
|---|---|---|
| $message | string | The message to log. |
| $priority | int | The logging priority, the lower, the more important. Ranges from 1 to 7 |
mergeDomDocuments(\DOMDocument $origin, \DOMDocument $document) : voidHelper method which merges a $document into $origin.
Inherited from: \DocBlox_Reflection_Abstract::mergeDomDocuments()\DocBlox_Reflection_DocBlockedAbstract::mergeDomDocuments()| Name | Type | Description |
|---|---|---|
| $origin | \DOMDocument | The document to accept the changes. |
| $document | \DOMDocument | The changes which are to be merged into the origin. |
mergeXmlToDomDocument(\DOMDocument $origin, string $xml) : voidHelper used to merge a given XML string into a given DOMDocument.
Inherited from: \DocBlox_Reflection_Abstract::mergeXmlToDomDocument()\DocBlox_Reflection_DocBlockedAbstract::mergeXmlToDomDocument()| Name | Type | Description |
|---|---|---|
| $origin | \DOMDocument | Destination to merge the XML into. |
| $xml | string | The XML to merge with the document. |
parseTokenizer(\DocBlox_Reflection_TokenIterator $tokens) : voidOverride method to add a validation point for the docblock where it has access to all processed tokens.
Inherited from: \DocBlox_Reflection_DocBlockedAbstract::parseTokenizer()| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator |
processClass(\DocBlox_Reflection_TokenIterator $tokens) : voidParses a class definition and adds it to the classes array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processConst(\DocBlox_Reflection_TokenIterator $tokens) : voidParses a global constant definition and adds it to the constants array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processFunction(\DocBlox_Reflection_TokenIterator $tokens) : voidParses a function definition and adds it to the functions array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processGenericInformation(\DocBlox_Reflection_TokenIterator $tokens) : voidHook method where you can determine the generic properties for this file before it is scanned for structures.
Example: for the DocBlox_Reflection_Function class this would be the name, parameters, etc.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Token array to parse. |
processInclude(\DocBlox_Reflection_TokenIterator $tokens) : voidParses an include definition and adds it to the includes array.
This method is also used for the include once, require and require once tokens.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processIncludeOnce(\DocBlox_Reflection_TokenIterator $tokens) : voidParses an include once definition and adds it to the includes array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processInterface(\DocBlox_Reflection_TokenIterator $tokens) : voidParses an interface definition and adds it to the interfaces array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processNamespace(\DocBlox_Reflection_TokenIterator $tokens) : voidChanges the active namespace indicator when a namespace token is encountered to indicate that the space has changed.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processRequire(\DocBlox_Reflection_TokenIterator $tokens) : voidParses a require definition and adds it to the includes array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processRequireOnce(\DocBlox_Reflection_TokenIterator $tokens) : voidParses a require once definition and adds it to the includes array.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processString(\DocBlox_Reflection_TokenIterator $tokens) : voidParses any T_STRING token to find generic keywords to process.
This token is used to find any:
define, thus constants which are defined using the define keyword- Globals
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
processToken(\DocBlox_Reflection_Token $token, \DocBlox_Reflection_TokenIterator $tokens) : voidProcesses the current token and invokes the correct process* method.
Inherited from: \DocBlox_Reflection_Abstract::processToken()\DocBlox_Reflection_DocBlockedAbstract::processToken()Tokens are automatically parsed by invoking a process* method (i.e. processFunction for a T_FUNCTION). If a method, which conforms to the standard above, does not exist the token is ignored.
| Name | Type | Description |
|---|---|---|
| $token | \DocBlox_Reflection_Token | The specific token which needs processing. |
| $tokens | \DocBlox_Reflection_TokenIterator | The iterator with tokens. |
processTokens(\DocBlox_Reflection_TokenIterator $tokens) : voidIterates through all tokens and when one is found we invoke the processToken method to handle the details.
This is a base class which may be overridden in sub-classes to scan the scope of the current token (i.e. the method body in case of the method)
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | The list of tokens to scan. |
processUse(\DocBlox_Reflection_TokenIterator $tokens) : voidProcesses the T_USE token and extracts all namespace aliases.
| Name | Type | Description |
|---|---|---|
| $tokens | \DocBlox_Reflection_TokenIterator | Tokens to interpret with the pointer at the token to be processed. |
setDefaultPackageName(string $default_package_name) : voidSets the name of the Default package.
Inherited from: \DocBlox_Reflection_DocBlockedAbstract::setDefaultPackageName()| Name | Type | Description |
|---|---|---|
| $default_package_name | string | The name that needs to be adopted by elements without package tags. |
setFilename(string $filename) : voidSets the file name for this file.
Inherited from: \DocBlox_Reflection_Abstract::setFilename()\DocBlox_Reflection_DocBlockedAbstract::setFilename()| Name | Type | Description |
|---|---|---|
| $filename | string | The path of this file. |
setHash(string $hash) : voidSets the hash which identifies this file.
| Name | Type | Description |
|---|---|---|
| $hash | string | A piece of text (possibly MD5 hash) which identifies the contents of this file. |
setMarkers(\string[] $markers) : voidSets a list of markers to search for.
| Name | Type | Description |
|---|---|---|
| $markers | \string[] | A list of marker terms to scan for. |
setName(string $name) : voidSets the name for this Reflection Object.
Inherited from: \DocBlox_Reflection_Abstract::setName()\DocBlox_Reflection_DocBlockedAbstract::setName()| Name | Type | Description |
|---|---|---|
| $name | string | String with unlimited length. |
| Exception | Description |
|---|---|
| \InvalidArgumentException |
setNamespace(string $namespace) : voidSets the name of the namespace to which this belongs.
Inherited from: \DocBlox_Reflection_Abstract::setNamespace()\DocBlox_Reflection_DocBlockedAbstract::setNamespace()| Name | Type | Description |
|---|---|---|
| $namespace | string | Full name of namespace. |
| Exception | Description |
|---|---|
| \InvalidArgumentException |
setNamespaceAliases(\string[] $namespace_aliases) : voidSets the list of namespace aliases in the parent file..
Inherited from: \DocBlox_Reflection_Abstract::setNamespaceAliases()\DocBlox_Reflection_DocBlockedAbstract::setNamespaceAliases()| Name | Type | Description |
|---|---|---|
| $namespace_aliases | \string[] | List of aliases to apply. |
| Exception | Description |
|---|---|
| \InvalidArgumentException |