Skip to content

Latest commit

 

History

History
2044 lines (1401 loc) · 56.8 KB

File metadata and controls

2044 lines (1401 loc) · 56.8 KB

BumbleDocGen / Technical description of the project / Parser / Entities and entities collections / MethodEntity


MethodEntity class:

namespace BumbleDocGen\LanguageHandler\Php\Parser\Entity;

class MethodEntity extends \BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity implements \BumbleDocGen\LanguageHandler\Php\Parser\Entity\MethodEntityInterface, \BumbleDocGen\Core\Parser\Entity\EntityInterface, \BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityInterface
Class method entity

Initialization methods:

  1. __construct

Methods:

  1. entityCacheIsOutdated
  2. getAbsoluteFileName - Returns the absolute path to a file if it can be retrieved and if the file is in the project directory
  3. getBodyCode
  4. getCacheKey
  5. getCachedEntityDependencies
  6. getDescription
  7. getDescriptionLinks - Get parsed links from description and doc blocks `see` and `link`
  8. getDocBlock
  9. getDocComment - Get the doc comment of an entity
  10. getDocCommentEntity
  11. getDocCommentLine
  12. getDocCommentLineRecursive
  13. getDocCommentRecursive
  14. getDocNote
  15. getEndLine
  16. getExamples - Get parsed examples from `examples` doc block
  17. getFileName
  18. getFileSourceLink
  19. getFirstExample - Get first example from @examples doc block
  20. getFirstReturnValue
  21. getImplementingClass
  22. getImplementingClassName
  23. getImplementingReflectionClass
  24. getModifiersString
  25. getName
  26. getNamespaceName
  27. getObjectId - Get entity unique ID
  28. getParameters
  29. getParametersString
  30. getPhpHandlerSettings
  31. getPrototype
  32. getReturnType
  33. getRootEntity
  34. getRootEntityCollection - Get parent collection of entities
  35. getShortName
  36. getSignature
  37. getStartColumn
  38. getStartLine
  39. getThrows - Get parsed throws from `throws` doc block
  40. hasDescriptionLinks
  41. hasExamples
  42. hasThrows
  43. isConstructor
  44. isDeprecated
  45. isDynamic
  46. isEntityDataCacheOutdated
  47. isEntityFileCanBeLoad
  48. isImplementedInParentClass
  49. isInitialization
  50. isInternal
  51. isPrivate
  52. isProtected
  53. isPublic
  54. isStatic
  55. parseAnnotationParams
  56. reloadEntityDependenciesCache
  57. removeEntityValueFromCache
  58. removeNotUsedEntityDataCache

Method details:

public function __construct(\BumbleDocGen\Core\Configuration\Configuration $configuration, \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity $classEntity, \BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper $parserHelper, \BumbleDocGen\Core\Cache\LocalCache\LocalObjectCache $localObjectCache, \Psr\Log\LoggerInterface $logger, \PhpParser\PrettyPrinter\Standard $astPrinter, string $methodName, string $declaringClassName, string $implementingClassName);

Parameters:

Name Type Description
$configuration \BumbleDocGen\Core\Configuration\Configuration -
$classEntity \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity -
$parserHelper \BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper -
$localObjectCache \BumbleDocGen\Core\Cache\LocalCache\LocalObjectCache -
$logger \Psr\Log\LoggerInterface -
$astPrinter \PhpParser\PrettyPrinter\Standard -
$methodName string -
$declaringClassName string -
$implementingClassName string -

// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function entityCacheIsOutdated(): bool;

Parameters: not specified

Return value: bool

Throws:


// 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

Return value: string | null

Throws:



// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait

public function getCacheKey(): string;

Parameters: not specified

Return value: string


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function getCachedEntityDependencies(): array;

Parameters: not specified

Return value: array

Throws:



// 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:


public function getDocBlock(bool $recursive = true): \phpDocumentor\Reflection\DocBlock;

Parameters:

Name Type Description
$recursive bool -

Return value: \phpDocumentor\Reflection\DocBlock

Throws:


public function getDocComment(): string;
Get the doc comment of an entity

Parameters: not specified

Return value: string

Throws:



public function getDocCommentLine(): int|null;

Parameters: not specified

Return value: int | null

Throws:




// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function getDocNote(): string;

Parameters: not specified

Return value: string



// 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



// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function getFileSourceLink(bool $withLine = true): string|null;

Parameters:

Name Type Description
$withLine bool -

Return value: string | null

Throws:


// 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


public function getFirstReturnValue(): mixed;

Parameters: not specified

Return value: mixed

Throws:


public function getImplementingClass(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity;

Parameters: not specified

Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity


public function getImplementingClassName(): string;

Parameters: not specified

Return value: string


public function getImplementingReflectionClass(): \Roave\BetterReflection\Reflection\ReflectionClass;

Parameters: not specified

Return value: \Roave\BetterReflection\Reflection\ReflectionClass

Throws:


public function getModifiersString(): string;

Parameters: not specified

Return value: string

Throws:


public function getName(): string;

Parameters: not specified

Return value: string



// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function getObjectId(): string;
Get entity unique ID

Parameters: not specified

Return value: string




public function getPhpHandlerSettings(): \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings;

Parameters: not specified

Return value: \BumbleDocGen\LanguageHandler\Php\PhpHandlerSettings




public function getRootEntity(): \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity;

Parameters: not specified

Return value: \BumbleDocGen\LanguageHandler\Php\Parser\Entity\ClassEntity


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


public function getShortName(): string;

Parameters: not specified

Return value: string





// 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:


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function hasDescriptionLinks(): bool;

Parameters: not specified

Return value: bool

Throws:


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function hasExamples(): bool;

Parameters: not specified

Return value: bool


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function hasThrows(): bool;

Parameters: not specified

Return value: bool


public function isConstructor(): bool;

Parameters: not specified

Return value: bool


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function isDeprecated(): bool;

Parameters: not specified

Return value: bool


public function isDynamic(): bool;

Parameters: not specified

Return value: bool


// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait

public function isEntityDataCacheOutdated(): bool;

Parameters: not specified

Return value: bool

Throws:


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function isEntityFileCanBeLoad(): bool;

Parameters: not specified

Return value: bool

Throws:


public function isImplementedInParentClass(): bool;

Parameters: not specified

Return value: bool



// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function isInternal(): bool;

Parameters: not specified

Return value: bool






public static function parseAnnotationParams(array $params): array;

Parameters:

Name Type Description
$params array -

Return value: array


// Implemented in BumbleDocGen\LanguageHandler\Php\Parser\Entity\BaseEntity

public function reloadEntityDependenciesCache(): array;

Parameters: not specified

Return value: array

Throws:


// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait

public function removeEntityValueFromCache(string $key): void;

Parameters:

Name Type Description
$key string -

Return value: void


// Implemented in BumbleDocGen\Core\Parser\Entity\Cache\CacheableEntityTrait

public function removeNotUsedEntityDataCache(): void;

Parameters: not specified

Return value: void

Throws: