X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/phpdocumentor/type-resolver/src/Types
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
phpdocumentor
/
type-resolver
/
src
/
Types
/
📁
..
📄
AbstractList.php
(1.87 KB)
📄
AggregatedType.php
(2.7 KB)
📄
Array_.php
(724 B)
📄
Boolean.php
(608 B)
📄
Callable_.php
(621 B)
📄
ClassString.php
(1.14 KB)
📄
Collection.php
(1.64 KB)
📄
Compound.php
(1017 B)
📄
Context.php
(2.99 KB)
📄
ContextFactory.php
(13.63 KB)
📄
Expression.php
(1.04 KB)
📄
False_.php
(579 B)
📄
Float_.php
(607 B)
📄
Integer.php
(610 B)
📄
Intersection.php
(1.01 KB)
📄
Iterable_.php
(826 B)
📄
Mixed_.php
(626 B)
📄
Null_.php
(618 B)
📄
Nullable.php
(1.07 KB)
📄
Object_.php
(1.75 KB)
📄
Parent_.php
(726 B)
📄
Resource_.php
(625 B)
📄
Scalar.php
(678 B)
📄
Self_.php
(702 B)
📄
Static_.php
(1015 B)
📄
String_.php
(619 B)
📄
This.php
(843 B)
📄
True_.php
(576 B)
📄
Void_.php
(761 B)
Editing: Context.php
<?php declare(strict_types=1); /** * This file is part of phpDocumentor. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @link http://phpdoc.org */ namespace phpDocumentor\Reflection\Types; use function strlen; use function substr; use function trim; /** * Provides information about the Context in which the DocBlock occurs that receives this context. * * A DocBlock does not know of its own accord in which namespace it occurs and which namespace aliases are applicable * for the block of code in which it is in. This information is however necessary to resolve Class names in tags since * you can provide a short form or make use of namespace aliases. * * The phpDocumentor Reflection component knows how to create this class but if you use the DocBlock parser from your * own application it is possible to generate a Context class using the ContextFactory; this will analyze the file in * which an associated class resides for its namespace and imports. * * @see ContextFactory::createFromClassReflector() * @see ContextFactory::createForNamespace() * * @psalm-immutable */ final class Context { /** @var string The current namespace. */ private $namespace; /** * @var string[] List of namespace aliases => Fully Qualified Namespace. * @psalm-var array<string, string> */ private $namespaceAliases; /** * Initializes the new context and normalizes all passed namespaces to be in Qualified Namespace Name (QNN) * format (without a preceding `\`). * * @param string $namespace The namespace where this DocBlock resides in. * @param string[] $namespaceAliases List of namespace aliases => Fully Qualified Namespace. * * @psalm-param array<string, string> $namespaceAliases */ public function __construct(string $namespace, array $namespaceAliases = []) { $this->namespace = $namespace !== 'global' && $namespace !== 'default' ? trim($namespace, '\\') : ''; foreach ($namespaceAliases as $alias => $fqnn) { if ($fqnn[0] === '\\') { $fqnn = substr($fqnn, 1); } if ($fqnn[strlen($fqnn) - 1] === '\\') { $fqnn = substr($fqnn, 0, -1); } $namespaceAliases[$alias] = $fqnn; } $this->namespaceAliases = $namespaceAliases; } /** * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in. */ public function getNamespace() : string { return $this->namespace; } /** * Returns a list of Qualified Namespace Names (thus without `\` in front) that are imported, the keys represent * the alias for the imported Namespace. * * @return string[] * * @psalm-return array<string, string> */ public function getNamespaceAliases() : array { return $this->namespaceAliases; } }
Upload File
Create Folder