[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/symfony/error-handler/ -> DebugClassLoader.php (summary)

(no description)

File Size: 1210 lines (46 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

DebugClassLoader:: (19 methods):
  __construct()
  getClassLoader()
  enable()
  disable()
  checkClasses()
  findFile()
  loadClass()
  checkClass()
  checkAnnotations()
  checkCase()
  darwinRealpath()
  getOwnInterfaces()
  setReturnType()
  normalizeType()
  patchReturnTypeWillChange()
  patchMethod()
  getUseStatements()
  fixReturnStatements()
  parsePhpDoc()


Class: DebugClassLoader  - X-Ref

Autoloader checking if the class is really defined in the file found.

The ClassLoader will wrap all registered autoloaders
and will throw an exception if a file is found but does
not declare the class.

It can also patch classes to turn docblocks into actual return types.
This behavior is controlled by the SYMFONY_PATCH_TYPE_DECLARATIONS env var,
which is a url-encoded array with the follow parameters:
- "force": any value enables deprecation notices - can be any of:
- "phpdoc" to patch only docblock annotations
- "2" to add all possible return types
- "1" to add return types but only to tests/final/internal/private methods
- "php": the target version of PHP - e.g. "7.1" doesn't generate "object" types
- "deprecations": "1" to trigger a deprecation notice when a child class misses a
return type while the parent declares an "@return" annotation

Note that patching doesn't care about any coding style so you'd better to run
php-cs-fixer after, with rules "phpdoc_trim_consecutive_blank_line_separation"
and "no_superfluous_phpdoc_tags" enabled typically.

__construct(callable $classLoader)   X-Ref
No description

getClassLoader()   X-Ref
No description

enable()   X-Ref
Wraps all autoloaders.


disable()   X-Ref
Disables the wrapping.


checkClasses()   X-Ref
No description

findFile(string $class)   X-Ref
No description

loadClass(string $class)   X-Ref
Loads the given class or interface.


checkClass(string $class, string $file = null)   X-Ref
No description

checkAnnotations(\ReflectionClass $refl, string $class)   X-Ref
No description

checkCase(\ReflectionClass $refl, string $file, string $class)   X-Ref
No description

darwinRealpath(string $real)   X-Ref
`realpath` on MacOSX doesn't normalize the case of characters.


getOwnInterfaces(string $class, ?string $parent)   X-Ref
`class_implements` includes interfaces from the parents so we have to manually exclude them.

return: string[]

setReturnType(string $types, string $class, string $method, string $filename, ?string $parent, \ReflectionType $returnType = null)   X-Ref
No description

normalizeType(string $type, string $class, ?string $parent, ?\ReflectionType $returnType)   X-Ref
No description

patchReturnTypeWillChange(\ReflectionMethod $method)   X-Ref
Utility method to add #[ReturnTypeWillChange] where php triggers deprecations.


patchMethod(\ReflectionMethod $method, string $returnType, string $declaringFile, string $normalizedType)   X-Ref
Utility method to add @return annotations to the Symfony code-base where it triggers self-deprecations.


getUseStatements(string $file)   X-Ref

return: $returnType

fixReturnStatements(\ReflectionMethod $method, string $returnType)   X-Ref
No description

parsePhpDoc(\Reflector $reflector)   X-Ref

param: \ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflector



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer