Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of Psy Shell.
5
 *
200 lars 6
 * (c) 2012-2023 Justin Hileman
148 lars 7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Psy\Reflection;
13
 
14
/**
15
 * A fake Reflector for namespaces.
16
 */
17
class ReflectionNamespace implements \Reflector
18
{
19
    private $name;
20
 
21
    /**
22
     * Construct a ReflectionNamespace object.
23
     *
24
     * @param string $name
25
     */
26
    public function __construct(string $name)
27
    {
28
        $this->name = $name;
29
    }
30
 
31
    /**
32
     * Gets the constant name.
33
     *
34
     * @return string
35
     */
36
    public function getName(): string
37
    {
38
        return $this->name;
39
    }
40
 
41
    /**
42
     * This can't (and shouldn't) do anything :).
43
     *
44
     * @throws \RuntimeException
45
     */
46
    public static function export($name)
47
    {
48
        throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)');
49
    }
50
 
51
    /**
52
     * To string.
53
     *
54
     * @return string
55
     */
56
    public function __toString(): string
57
    {
58
        return $this->getName();
59
    }
60
}