Skip to content

Commit 5f80e05

Browse files
committed
Update namespaces
1 parent 96ee168 commit 5f80e05

File tree

8 files changed

+39
-39
lines changed

8 files changed

+39
-39
lines changed

demo/annotations/LengthAnnotation.php renamed to demo/Annotations/LengthAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <https://github.com/mindplay-dk/php-annotations>
1212
*/
1313

14-
namespace mindplay\demo\annotations;
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
1515

1616

1717
use ElementaryFramework\Annotations\Exceptions\AnnotationException;

demo/Annotations/Package.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the php-annotation framework.
5+
*
6+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
7+
*
8+
* This software is licensed under the GNU LGPL license
9+
* for more information, please see:
10+
*
11+
* <https://github.com/mindplay-dk/php-annotations>
12+
*/
13+
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
15+
16+
17+
use ElementaryFramework\Annotations\AnnotationManager;
18+
19+
abstract class Package
20+
{
21+
public static function register(AnnotationManager $annotationManager)
22+
{
23+
$annotationManager->registerAnnotation('length', 'ElementaryFramework\Annotations\Demo\Annotations\LengthAnnotation');
24+
$annotationManager->registerAnnotation('required', 'ElementaryFramework\Annotations\Demo\Annotations\RequiredAnnotation');
25+
$annotationManager->registerAnnotation('text', 'ElementaryFramework\Annotations\Demo\Annotations\TextAnnotation');
26+
$annotationManager->registerAnnotation('range', 'ElementaryFramework\Annotations\Demo\Annotations\RangeAnnotation');
27+
}
28+
}

demo/annotations/RangeAnnotation.php renamed to demo/Annotations/RangeAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <https://github.com/mindplay-dk/php-annotations>
1212
*/
1313

14-
namespace mindplay\demo\annotations;
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
1515

1616
use ElementaryFramework\Annotations\Exceptions\AnnotationException;
1717

demo/annotations/RequiredAnnotation.php renamed to demo/Annotations/RequiredAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <https://github.com/mindplay-dk/php-annotations>
1212
*/
1313

14-
namespace mindplay\demo\annotations;
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
1515

1616
/**
1717
* Specifies validation requiring a non-empty value.

demo/annotations/TextAnnotation.php renamed to demo/Annotations/TextAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* <https://github.com/mindplay-dk/php-annotations>
1212
*/
1313

14-
namespace mindplay\demo\annotations;
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
1515

1616

1717
use ElementaryFramework\Annotations\Annotation;

demo/annotations/ValidationAnnotationBase.php renamed to demo/Annotations/ValidationAnnotationBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
* <https://github.com/mindplay-dk/php-annotations>
1212
*/
1313

14-
namespace mindplay\demo\annotations;
14+
namespace ElementaryFramework\Annotations\Demo\Annotations;
1515

1616

1717
use ElementaryFramework\Annotations\Annotation;
1818

1919
/**
20-
* Abstract base class for validation annotations.
20+
* Abstract base class for validation Annotations.
2121
*/
2222
abstract class ValidationAnnotationBase extends Annotation
2323
{

demo/annotations/Package.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

demo/index.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use Composer\Autoload\ClassLoader;
55
use ElementaryFramework\Annotations\AnnotationCache;
66
use ElementaryFramework\Annotations\Annotations;
7-
use mindplay\demo\annotations\Package;
7+
use ElementaryFramework\Annotations\Demo\Annotations\Package;
88

99
## Configure a simple auto-loader
1010
$vendor_path = dirname(__DIR__) . '/vendor';
@@ -23,19 +23,19 @@
2323
## Configure the cache-path. The static `Annotations` class will configure any public
2424
## properties of `AnnotationManager` when it creates it. The `AnnotationManager::$cachePath`
2525
## property is a path to a writable folder, where the `AnnotationManager` caches parsed
26-
## annotations from individual source code files.
26+
## Annotations from individual source code files.
2727

2828
Annotations::$config['cache'] = new AnnotationCache(__DIR__ . '/runtime');
2929

30-
## Register demo annotations.
30+
## Register demo Annotations.
3131
Package::register(Annotations::getManager());
3232

3333
## For this example, we're going to generate a simple form that allows us to edit a `Person`
3434
## object. We'll define a few public properties and annotate them with some useful metadata,
3535
## which will enable us to make decisions (at run-time) about how to display each field,
3636
## how to parse the values posted back from the form, and how to validate the input.
3737
##
38-
## Note the use of standard PHP-DOC annotations, such as `@var string` - this metadata is
38+
## Note the use of standard PHP-DOC Annotations, such as `@var string` - this metadata is
3939
## traditionally useful both as documentation to developers, and as hints for an IDE. In
4040
## this example, we're going to use that same information as advice to our components, at
4141
## run-time, to help them establish defaults and make sensible decisions about how to
@@ -264,7 +264,7 @@ public function __construct($object)
264264
}
265265

266266
## This helper-method is similar to the one we defined for the widget base
267-
## class, but fetches annotations for the specified property.
267+
## class, but fetches Annotations for the specified property.
268268

269269
private function getMetadata($property, $type, $name, $default = null)
270270
{

0 commit comments

Comments
 (0)