substitute()
substitute(
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|\phpDocumentor\Reflection\Fqsen|\phpDocumentor\Reflection\Type|\phpDocumentor\Descriptor\Collection<mixed>|array|\phpDocumentor\Descriptor\Descriptor|\phpDocumentor\Descriptor\DocumentationSetDescriptor $item,
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Descriptor\DescriptorAbstract|null $container = null)
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
: string|\phpDocumentor\Descriptor\DocumentationSetDescriptor|\phpDocumentor\Descriptor\DescriptorAbstract|\phpDocumentor\Descriptor\Collection<string|\phpDocumentor\Descriptor\DescriptorAbstract>|(string|\phpDocumentor\Descriptor\DescriptorAbstract)[]|null
Substitutes the given item or its children's FQCN with an object alias.
This method may do either of the following depending on the item's type
FQSEN or String
If the given item is a string then this method will attempt to find an appropriate Class, Interface or
TraitDescriptor object and return that. See {@see \phpDocumentor\Compiler\ApiDocumentation\Linker\DescriptorRepository::findAlias()} for more information
on the normalization of these strings.
Array or Traversable
Iterate through each item, pass each key's contents to a new call to substitute and replace the key's
contents if the contents is not an object (objects automatically update and this saves performance).
Object
Determines all eligible substitutions using the substitutions property, construct a getter and retrieve
the field's contents. Pass these contents to a new call of substitute and use a setter to replace the field's
contents if anything other than null is returned.
The Container is a descriptor that acts as container for all elements underneath or null if there is no current
container.
This method will return null if no substitution was possible and all of the above should not update the parent
item when null is passed.
Parameters
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|\phpDocumentor\Reflection\Fqsen|\phpDocumentor\Reflection\Type|\phpDocumentor\Descriptor\Collection|array|\phpDocumentor\Descriptor\Descriptor|\phpDocumentor\Descriptor\DocumentationSetDescriptor |
$item |
|
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
\phpDocumentor\Descriptor\DescriptorAbstract|null |
$container |
|
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
Returns
Deprecated: Please use getType in /opt/phpdoc/src/phpDocumentor/Descriptor/Traits/CanHaveAType.php on line 50
string|\phpDocumentor\Descriptor\DocumentationSetDescriptor|\phpDocumentor\Descriptor\DescriptorAbstract|\phpDocumentor\Descriptor\Collection|(string|\phpDocumentor\Descriptor\DescriptorAbstract)[]|null
—