|
1 | 1 | <?php
|
2 |
| -namespace mindplay\demo; |
| 2 | +namespace ElementaryFramework\Annotations\Demo; |
3 | 3 |
|
4 | 4 | use Composer\Autoload\ClassLoader;
|
5 | 5 | use ElementaryFramework\Annotations\AnnotationCache;
|
|
17 | 17 | require_once($vendor_path . '/autoload.php');
|
18 | 18 |
|
19 | 19 | $auto_loader = new ClassLoader();
|
20 |
| -$auto_loader->addPsr4("mindplay\\demo\\", __DIR__); |
| 20 | +$auto_loader->addPsr4("ElementaryFramework\\Annotations\\Demo\\", __DIR__); |
21 | 21 | $auto_loader->register();
|
22 | 22 |
|
23 | 23 | ## Configure the cache-path. The static `Annotations` class will configure any public
|
24 | 24 | ## properties of `AnnotationManager` when it creates it. The `AnnotationManager::$cachePath`
|
25 | 25 | ## property is a path to a writable folder, where the `AnnotationManager` caches parsed
|
26 | 26 | ## Annotations from individual source code files.
|
27 | 27 |
|
28 |
| -Annotations::$config['cache'] = new AnnotationCache(__DIR__ . '/runtime'); |
| 28 | +Annotations::setConfig('cache', new AnnotationCache(__DIR__ . '/runtime')); |
29 | 29 |
|
30 | 30 | ## Register demo Annotations.
|
31 | 31 | Package::register(Annotations::getManager());
|
|
43 | 43 |
|
44 | 44 | /**
|
45 | 45 | * Class Person
|
46 |
| - * @package mindplay\demo |
| 46 | + * @package ElementaryFramework\Annotations\Demo |
47 | 47 | *
|
48 | 48 | * @method string test(integer $a, string $b, bool $c) The test method
|
49 | 49 | * @method bool check() The check method
|
@@ -257,7 +257,7 @@ public function __construct($object)
|
257 | 257 | foreach ($class->getProperties() as $property) {
|
258 | 258 | $type = $this->getMetadata($property->name, '@var', 'type', 'string');
|
259 | 259 |
|
260 |
| - $wtype = 'mindplay\\demo\\' . ucfirst($type) . 'Widget'; |
| 260 | + $wtype = 'ElementaryFramework\\Annotations\\Demo\\' . ucfirst($type) . 'Widget'; |
261 | 261 |
|
262 | 262 | $this->widgets[$property->name] = new $wtype($this->object, $property->name);
|
263 | 263 | }
|
|
0 commit comments