BumbleDocGen / Technical description of the project / Parser / Entities and entities collections / ClassEntity
ClassEntity class:
namespace BumbleDocGen\LanguageHandler\Php\Parser\Entity;
class ClassEntity extends \BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity implements \BumbleDocGen\Core\Renderer\Context\DocumentTransformableEntityInterface, \BumbleDocGen\Core\Parser\Entity\RootEntityInterface, \BumbleDocGen\Core\Parser\Entity\EntityInterface, \BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityInterfaceClass entity
- cursorToDocAttributeLinkFragment
- documentCreationAllowed
- entityCacheIsOutdated
- entityDataCanBeLoaded
- getAbsoluteFileName - Returns the absolute path to a file if it can be retrieved and if the file is in the project directory
- getCacheKey
- getCachedEntityDependencies
- getCasesNames
- getConstant
- getConstantEntity
- getConstantEntityCollection
- getConstants
- getConstantsData
- getDescription
- getDescriptionLinks - Get parsed links from description and doc blocks `see` and `link`
- getDocBlock
- getDocComment - Get the doc comment of an entity
- getDocCommentEntity
- getDocNote
- getDocRender
- getEndLine
- getEntityDependencies
- getExamples - Get parsed examples from `examples` doc block
- getExtends
- getFileContent
- getFileName - Returns the relative path to a file if it can be retrieved and if the file is in the project directory
- getFileSourceLink
- getFirstExample - Get first example from @examples doc block
- getFullFileName
- getImplementingReflectionClass
- getInterfaceNames
- getInterfacesEntities
- getInterfacesString
- getMethodEntity
- getMethodEntityCollection
- getMethodsData
- getModifiersString
- getName
- getNamespaceName
- getObjectId - Get entity unique ID
- getParentClass
- getParentClassName
- getParentClassNames
- getPhpHandlerSettings
- getPluginData
- getPropertiesData
- getPropertyEntity
- getPropertyEntityCollection
- getReflector
- getRelativeFileName
- getRootEntityCollection - Get parent collection of entities
- getShortName
- getStartLine
- getThrows - Get parsed throws from `throws` doc block
- getTraitsNames
- hasAnnotationKey
- hasConstant
- hasDescriptionLinks
- hasExamples
- hasMethod
- hasParentClass
- hasProperty
- hasThrows
- hasTraits
- implementsInterface
- isAbstract
- isClassLoad
- isDeprecated
- isEntityDataCacheOutdated
- isEntityFileCanBeLoad
- isEntityNameValid - Check if entity name is valid
- isEnum
- isExternalLibraryEntity - The entity is loaded from a third party library and should not be treated the same as a standard one
- isInGit - Checking if class file is in git repository
- isInstantiable
- isInterface
- isInternal
- isSubclassOf
- isTrait
- loadPluginData
- reloadEntityDependenciesCache
- removeEntityValueFromCache
- removeNotUsedEntityDataCache
- setReflectionClass
- # __construct | source code
public function __construct(\BumbleDocGen\Core\Configuration\Configuration $configuration, \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings $phpHandlerSettings, \BumbleDocGen\LanguageHandler\Php\Parser\Entity\Reflection\ReflectorWrapper $reflector, \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntityCollection $classEntityCollection, \BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper $parserHelper, \BumbleDocGen\LanguageHandler\Php\Parser\ComposerParser $composerParser, \BumbleDocGen\Core\Cache\LocalCache\LocalObjectCache $localObjectCache, \Psr\Log\LoggerInterface $logger, string $className, string|null $relativeFileName);Parameters:
| Name | Type | Description |
|---|---|---|
| $configuration | \BumbleDocGen\Core\Configuration\Configuration | - |
| $phpHandlerSettings | \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings | - |
| $reflector | \BumbleDocGen\LanguageHandler\Php\Parser\Entity\Reflection\ReflectorWrapper | - |
| $classEntityCollection | \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntityCollection | - |
| $parserHelper | \BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper | - |
| $composerParser | \BumbleDocGen\LanguageHandler\Php\Parser\ComposerParser | - |
| $localObjectCache | \BumbleDocGen\Core\Cache\LocalCache\LocalObjectCache | - |
| $logger | \Psr\Log\LoggerInterface | - |
| $className | string | - |
| $relativeFileName | string | null | - |
- # cursorToDocAttributeLinkFragment | source code
public function cursorToDocAttributeLinkFragment(string $cursor, bool $isForDocument = true): string;Parameters:
| Name | Type | Description |
|---|---|---|
| $cursor | string | - |
| $isForDocument | bool | - |
Return value: string
Throws:
- # documentCreationAllowed | source code
public function documentCreationAllowed(): bool;Parameters: not specified
Return value: bool
Throws:
- # entityCacheIsOutdated | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function entityCacheIsOutdated(): bool;Parameters: not specified
Return value: bool
Throws:
- # entityDataCanBeLoaded | source code
public function entityDataCanBeLoaded(): bool;Parameters: not specified
Return value: bool
Throws:
- # getAbsoluteFileName | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getAbsoluteFileName(): string|null;Returns the absolute path to a file if it can be retrieved and if the file is in the project directory
Parameters: not specified
Throws:
- # getCacheKey | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait
public function getCacheKey(): string;Parameters: not specified
Return value: string
- # getCachedEntityDependencies | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getCachedEntityDependencies(): array;Parameters: not specified
Return value: array
Throws:
- # getCasesNames | source code
public function getCasesNames(): array;Parameters: not specified
Return value: array
Throws:
- # getConstant | source code
public function getConstant(string $name): string|array|int|bool|null|float;Parameters:
| Name | Type | Description |
|---|---|---|
| $name | string | - |
Return value: string | array | int | bool | null | float
Throws:
- # getConstantEntity | source code
public function getConstantEntity(string $constantName, bool $unsafe = true): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ConstantEntity|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $constantName | string | - |
| $unsafe | bool | - |
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ConstantEntity | null
Throws:
- # getConstantEntityCollection | source code
public function getConstantEntityCollection(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ConstantEntityCollection;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ConstantEntityCollection
Throws:
- # getConstants | source code
public function getConstants(): array;Parameters: not specified
Return value: array
Throws:
- # getConstantsData | source code
public function getConstantsData(): array;Parameters: not specified
Return value: array
Throws:
- # getDescription | source code
public function getDescription(): string;Parameters: not specified
Return value: string
Throws:
- # getDescriptionLinks | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getDescriptionLinks(): array;Get parsed links from description and doc blocks `see` and `link`
Parameters: not specified
Return value: array
Throws:
- # getDocBlock | source code
public function getDocBlock(): \phpDocumentor\Reflection\DocBlock;Parameters: not specified
Return value: \phpDocumentor\Reflection\DocBlock
Throws:
- # getDocComment | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getDocComment(): string;Get the doc comment of an entity
Parameters: not specified
Return value: string
Throws:
- # getDocCommentEntity | source code
public function getDocCommentEntity(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity
Throws:
- # getDocNote | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getDocNote(): string;Parameters: not specified
Return value: string
- # getDocRender | source code
public function getDocRender(): \BumbleDocGen\Core\Renderer\EntityDocRenderer\EntityDocRendererInterface;Parameters: not specified
Return value: \BumbleDocGen\Core\Renderer\EntityDocRenderer\EntityDocRendererInterface
Throws:
- # getEndLine | source code
public function getEndLine(): int;Parameters: not specified
Return value: int
Throws:
- # getEntityDependencies | source code
public function getEntityDependencies(): array;Parameters: not specified
Return value: array
- # getExamples | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getExamples(): array;Get parsed examples from `examples` doc block
Parameters: not specified
Return value: array
- # getExtends | source code
public function getExtends(): string|null;Parameters: not specified
Throws:
- # getFileContent | source code
public function getFileContent(): string;Parameters: not specified
Return value: string
Throws:
- # getFileName | source code
public function getFileName(): string|null;Returns the relative path to a file if it can be retrieved and if the file is in the project directory
Parameters: not specified
- # getFileSourceLink | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getFileSourceLink(bool $withLine = true): string|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $withLine | bool | - |
Throws:
- # getFirstExample | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getFirstExample(): string;Get first example from @examples doc block
Parameters: not specified
Return value: string
- # getFullFileName | source code
public function getFullFileName(): string|null;Parameters: not specified
Throws:
- # getImplementingReflectionClass | source code
public function getImplementingReflectionClass(): \Roave\BetterReflection\Reflection\ReflectionClass;Parameters: not specified
Return value: \Roave\BetterReflection\Reflection\ReflectionClass
Throws:
- # getInterfaceNames | source code
public function getInterfaceNames(): array;Parameters: not specified
Return value: array
Throws:
- # getInterfacesEntities | source code
public function getInterfacesEntities(): array;Parameters: not specified
Return value: array
Throws:
- # getInterfacesString | source code
public function getInterfacesString(): string;Parameters: not specified
Return value: string
Throws:
- # getMethodEntity | source code
public function getMethodEntity(string $methodName, bool $unsafe = true): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\MethodEntity|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $methodName | string | - |
| $unsafe | bool | - |
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\MethodEntity | null
Throws:
- # getMethodEntityCollection | source code
public function getMethodEntityCollection(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\MethodEntityCollection;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\MethodEntityCollection
Throws:
- # getMethodsData | source code
public function getMethodsData(): array;Parameters: not specified
Return value: array
Throws:
- # getModifiersString | source code
public function getModifiersString(): string;Parameters: not specified
Return value: string
Throws:
- # getName | source code
public function getName(): string;Parameters: not specified
Return value: string
- # getNamespaceName | source code
public function getNamespaceName(): string;Parameters: not specified
Return value: string
Throws:
- # getObjectId | source code
public function getObjectId(): string;Get entity unique ID
Parameters: not specified
Return value: string
- # getParentClass | source code
public function getParentClass(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity|null;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity | null
Throws:
- # getParentClassName | source code
public function getParentClassName(): string|null;Parameters: not specified
Throws:
- # getParentClassNames | source code
public function getParentClassNames(): array;Parameters: not specified
Return value: array
Throws:
- # getPhpHandlerSettings | source code
public function getPhpHandlerSettings(): \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings
- # getPluginData | source code
public function getPluginData(string $pluginKey): array|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $pluginKey | string | - |
- # getPropertiesData | source code
public function getPropertiesData(): array;Parameters: not specified
Return value: array
Throws:
- # getPropertyEntity | source code
public function getPropertyEntity(string $propertyName, bool $unsafe = true): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\PropertyEntity|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $propertyName | string | - |
| $unsafe | bool | - |
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\PropertyEntity | null
Throws:
- # getPropertyEntityCollection | source code
public function getPropertyEntityCollection(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\PropertyEntityCollection;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\PropertyEntityCollection
Throws:
- # getReflector | source code
public function getReflector(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\Reflection\ReflectorWrapper;Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\Reflection\ReflectorWrapper
- # getRelativeFileName | source code
public function getRelativeFileName(bool $loadIfEmpty = true): string|null;Parameters:
| Name | Type | Description |
|---|---|---|
| $loadIfEmpty | bool | - |
Throws:
- # getRootEntityCollection | source code
public function getRootEntityCollection(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntityCollection;Get parent collection of entities
Parameters: not specified
Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntityCollection
- # getShortName | source code
public function getShortName(): string;Parameters: not specified
Return value: string
- # getStartLine | source code
public function getStartLine(): int;Parameters: not specified
Return value: int
Throws:
- # getThrows | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function getThrows(): array;Get parsed throws from `throws` doc block
Parameters: not specified
Return value: array
Throws:
- # getTraitsNames | source code
public function getTraitsNames(): array;Parameters: not specified
Return value: array
Throws:
- # hasAnnotationKey | source code
public function hasAnnotationKey(string $annotationKey): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $annotationKey | string | - |
Return value: bool
- # hasConstant | source code
public function hasConstant(string $constant): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $constant | string | - |
Return value: bool
Throws:
- # hasDescriptionLinks | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function hasDescriptionLinks(): bool;Parameters: not specified
Return value: bool
Throws:
- # hasExamples | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function hasExamples(): bool;Parameters: not specified
Return value: bool
- # hasMethod | source code
public function hasMethod(string $method): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $method | string | - |
Return value: bool
Throws:
- # hasParentClass | source code
public function hasParentClass(string $parentClassName): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $parentClassName | string | - |
Return value: bool
Throws:
- # hasProperty | source code
public function hasProperty(string $property): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $property | string | - |
Return value: bool
Throws:
- # hasThrows | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function hasThrows(): bool;Parameters: not specified
Return value: bool
- # hasTraits | source code
public function hasTraits(): bool;Parameters: not specified
Return value: bool
Throws:
- # implementsInterface | source code
public function implementsInterface(string $interfaceName): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $interfaceName | string | - |
Return value: bool
Throws:
- # isAbstract | source code
public function isAbstract(): bool;Parameters: not specified
Return value: bool
Throws:
- #
isClassLoad
⚠️ Is internal | source code
public function isClassLoad(): bool;Parameters: not specified
Return value: bool
- # isDeprecated | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function isDeprecated(): bool;Parameters: not specified
Return value: bool
- # isEntityDataCacheOutdated | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait
public function isEntityDataCacheOutdated(): bool;Parameters: not specified
Return value: bool
Throws:
- # isEntityFileCanBeLoad | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function isEntityFileCanBeLoad(): bool;Parameters: not specified
Return value: bool
Throws:
- # isEntityNameValid | source code
public static function isEntityNameValid(string $entityName): bool;Check if entity name is valid
Parameters:
| Name | Type | Description |
|---|---|---|
| $entityName | string | - |
Return value: bool
- # isEnum | source code
public function isEnum(): bool;Parameters: not specified
Return value: bool
Throws:
- # isExternalLibraryEntity | source code
public function isExternalLibraryEntity(): bool;The entity is loaded from a third party library and should not be treated the same as a standard one
Parameters: not specified
Return value: bool
- # isInGit | source code
public function isInGit(): bool;Checking if class file is in git repository
Parameters: not specified
Return value: bool
Throws:
- # isInstantiable | source code
public function isInstantiable(): bool;Parameters: not specified
Return value: bool
Throws:
- # isInterface | source code
public function isInterface(): bool;Parameters: not specified
Return value: bool
Throws:
- # isInternal | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function isInternal(): bool;Parameters: not specified
Return value: bool
- # isSubclassOf | source code
public function isSubclassOf(string $className): bool;Parameters:
| Name | Type | Description |
|---|---|---|
| $className | string | - |
Return value: bool
Throws:
- # isTrait | source code
public function isTrait(): bool;Parameters: not specified
Return value: bool
Throws:
- # loadPluginData | source code
public function loadPluginData(string $pluginKey, array $data): void;Parameters:
| Name | Type | Description |
|---|---|---|
| $pluginKey | string | - |
| $data | array | - |
Return value: void
- # reloadEntityDependenciesCache | source code
// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity
public function reloadEntityDependenciesCache(): array;Parameters: not specified
Return value: array
Throws:
- # removeEntityValueFromCache | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait
public function removeEntityValueFromCache(string $key): void;Parameters:
| Name | Type | Description |
|---|---|---|
| $key | string | - |
Return value: void
- # removeNotUsedEntityDataCache | source code
// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait
public function removeNotUsedEntityDataCache(): void;Parameters: not specified
Return value: void
Throws:
- # setReflectionClass | source code
public function setReflectionClass(\Roave\BetterReflection\Reflection\ReflectionClass $reflectionClass): void;Parameters:
| Name | Type | Description |
|---|---|---|
| $reflectionClass | \Roave\BetterReflection\Reflection\ReflectionClass | - |
Return value: void