Skip to content

Commit 96ee168

Browse files
committed
Update demo package
1 parent 6b72847 commit 96ee168

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

demo/annotations/LengthAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace mindplay\demo\annotations;
1515

1616

17-
use mindplay\annotations\AnnotationException;
17+
use ElementaryFramework\Annotations\Exceptions\AnnotationException;
1818

1919
/**
2020
* Specifies validation of a string, requiring a minimum and/or maximum length.

demo/annotations/Package.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
namespace mindplay\demo\annotations;
1515

1616

17-
use mindplay\annotations\AnnotationManager;
17+
use ElementaryFramework\Annotations\AnnotationManager;
1818

1919
abstract class Package
2020
{
2121
public static function register(AnnotationManager $annotationManager)
2222
{
23-
$annotationManager->registry['length'] = 'mindplay\demo\annotations\LengthAnnotation';
24-
$annotationManager->registry['required'] = 'mindplay\demo\annotations\RequiredAnnotation';
25-
$annotationManager->registry['text'] = 'mindplay\demo\annotations\TextAnnotation';
26-
$annotationManager->registry['range'] = 'mindplay\demo\annotations\RangeAnnotation';
23+
$annotationManager->registerAnnotation('length', 'mindplay\demo\annotations\LengthAnnotation');
24+
$annotationManager->registerAnnotation('required', 'mindplay\demo\annotations\RequiredAnnotation');
25+
$annotationManager->registerAnnotation('text', 'mindplay\demo\annotations\TextAnnotation');
26+
$annotationManager->registerAnnotation('range', 'mindplay\demo\annotations\RangeAnnotation');
2727
}
2828
}

demo/annotations/RangeAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace mindplay\demo\annotations;
1515

16-
use mindplay\annotations\AnnotationException;
16+
use ElementaryFramework\Annotations\Exceptions\AnnotationException;
1717

1818
/**
1919
* Specifies validation against a minimum and/or maximum numeric value.

demo/annotations/TextAnnotation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace mindplay\demo\annotations;
1515

1616

17-
use mindplay\annotations\Annotation;
17+
use ElementaryFramework\Annotations\Annotation;
1818

1919
/**
2020
* Defines various text (labels, hints, etc.) to be displayed with the annotated property

demo/annotations/ValidationAnnotationBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace mindplay\demo\annotations;
1515

1616

17-
use mindplay\annotations\Annotation;
17+
use ElementaryFramework\Annotations\Annotation;
1818

1919
/**
2020
* Abstract base class for validation annotations.

demo/index.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
namespace mindplay\demo;
33

44
use Composer\Autoload\ClassLoader;
5-
use mindplay\annotations\AnnotationCache;
6-
use mindplay\annotations\Annotations;
5+
use ElementaryFramework\Annotations\AnnotationCache;
6+
use ElementaryFramework\Annotations\Annotations;
77
use mindplay\demo\annotations\Package;
88

99
## Configure a simple auto-loader
@@ -41,6 +41,14 @@
4141
## run-time, to help them establish defaults and make sensible decisions about how to
4242
## handle the value of each property.
4343

44+
/**
45+
* Class Person
46+
* @package mindplay\demo
47+
*
48+
* @method string test(integer $a, string $b, bool $c) The test method
49+
* @method bool check() The check method
50+
* @method bool uncheck()
51+
*/
4452
class Person
4553
{
4654
/**

0 commit comments

Comments
 (0)