Skip to content

Commit c278351

Browse files
committed
Update files and change namespaces
1 parent d6f8667 commit c278351

27 files changed

+449
-260
lines changed

src/annotations/Annotation.php renamed to src/Annotations/Annotation.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* A general-purpose base class for annotations.

src/annotations/AnnotationCache.php renamed to src/Annotations/AnnotationCache.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* This class is responsible for storing and updating parsed annotation-data in PHP files.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/**
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
14+
*
15+
*
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
19+
*
20+
* <https://github.com/mindplay-dk/php-annotations>
21+
*/
22+
23+
namespace ElementaryFramework\Annotations;
24+
25+
/**
26+
* This exception is thrown by various classes in the annotations package,
27+
* making it possible to catch annotation-specific exceptions in user code.
28+
*/
29+
class AnnotationException extends \Exception
30+
{
31+
}

src/annotations/AnnotationFile.php renamed to src/Annotations/AnnotationFile.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* This class represents a php source-code file inspected for Annotations.

src/annotations/AnnotationManager.php renamed to src/Annotations/AnnotationManager.php

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* This class manages the retrieval of Annotations from source code files
@@ -66,14 +75,14 @@ class AnnotationManager
6675
'internal' => false,
6776
'license' => false,
6877
'link' => false,
69-
'method' => 'mindplay\annotations\standard\MethodAnnotation',
78+
'method' => 'ElementaryFramework\Annotations\standard\MethodAnnotation',
7079
'name' => false,
7180
'package' => false,
72-
'param' => 'mindplay\annotations\standard\ParamAnnotation',
73-
'property' => 'mindplay\annotations\standard\PropertyAnnotation',
74-
'property-read' => 'mindplay\annotations\standard\PropertyReadAnnotation',
75-
'property-write' => 'mindplay\annotations\standard\PropertyWriteAnnotation',
76-
'return' => 'mindplay\annotations\standard\ReturnAnnotation',
81+
'param' => 'ElementaryFramework\Annotations\standard\ParamAnnotation',
82+
'property' => 'ElementaryFramework\Annotations\standard\PropertyAnnotation',
83+
'property-read' => 'ElementaryFramework\Annotations\standard\PropertyReadAnnotation',
84+
'property-write' => 'ElementaryFramework\Annotations\standard\PropertyWriteAnnotation',
85+
'return' => 'ElementaryFramework\Annotations\standard\ReturnAnnotation',
7786
'see' => false,
7887
'since' => false,
7988
'source' => false,
@@ -83,11 +92,11 @@ class AnnotationManager
8392
'todo' => false,
8493
'tutorial' => false,
8594
'throws' => false,
86-
'type' => 'mindplay\annotations\standard\TypeAnnotation',
87-
'usage' => 'mindplay\annotations\UsageAnnotation',
88-
'stop' => 'mindplay\annotations\StopAnnotation',
95+
'type' => 'ElementaryFramework\Annotations\standard\TypeAnnotation',
96+
'usage' => 'ElementaryFramework\Annotations\UsageAnnotation',
97+
'stop' => 'ElementaryFramework\Annotations\StopAnnotation',
8998
'uses' => false,
90-
'var' => 'mindplay\annotations\standard\VarAnnotation',
99+
'var' => 'ElementaryFramework\Annotations\standard\VarAnnotation',
91100
'version' => false,
92101
);
93102

@@ -369,9 +378,9 @@ protected function classHasMember($className, $memberType, $memberName)
369378

370379
/**
371380
* Validates the constraints (as defined by the UsageAnnotation of each annotation) of a
372-
* list of annotations for a given type of member.
381+
* list of Annotations for a given type of member.
373382
*
374-
* @param IAnnotation[] $annotations An array of IAnnotation objects to be validated (sorted with inherited annotations on top).
383+
* @param IAnnotation[] $annotations An array of IAnnotation objects to be validated (sorted with inherited Annotations on top).
375384
* @param string $member The type of member to validate against (e.g. "class", "property" or "method").
376385
*
377386
* @return IAnnotation[] validated and filtered list of IAnnotations objects

src/annotations/AnnotationParser.php renamed to src/Annotations/AnnotationParser.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
if (!defined('T_TRAIT')) {
1726
define(__NAMESPACE__ . '\\T_TRAIT', -2);
@@ -70,8 +79,8 @@ public function __construct(AnnotationManager $manager)
7079
* @param string $source The PHP source code to be parsed
7180
* @param string $path The path of the source file being parsed (for error-reporting only)
7281
*
73-
* @return string PHP source code to construct the annotations of the given PHP source code
74-
* @throws AnnotationException if orphaned annotations are found at the end of the file
82+
* @return string PHP source code to construct the Annotations of the given PHP source code
83+
* @throws AnnotationException if orphaned Annotations are found at the end of the file
7584
*/
7685
public function parse($source, $path)
7786
{

src/annotations/Annotations.php renamed to src/Annotations/Annotations.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* Thin, static class with shortcut methods for inspection of Annotations

src/Annotations/IAnnotation.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/**
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
14+
*
15+
*
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
19+
*
20+
* <https://github.com/mindplay-dk/php-annotations>
21+
*/
22+
23+
namespace ElementaryFramework\Annotations;
24+
25+
/**
26+
* This interface is mandatory for all Annotations.
27+
*/
28+
interface IAnnotation
29+
{
30+
public function initAnnotation(array $properties);
31+
}

src/annotations/IAnnotationFileAware.php renamed to src/Annotations/IAnnotationFileAware.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* This interface mandatory for all Annotations, that require more information about annotation origins.

src/annotations/IAnnotationParser.php renamed to src/Annotations/IAnnotationParser.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
<?php
22

33
/**
4-
* This file is part of the php-annotation framework.
4+
* Annotations
5+
*
6+
* Allows the creation of custom annotations in PHP.
7+
*
8+
* @category Library
9+
* @package Annotations
10+
* @author Axel Nana <ax.lnana@outlook.com>
11+
* @copyright 2011-2015 Rasmus Schultz <rasmus@mindplay.dk>, 2018 Aliens Group, Inc.
12+
* @license LGPL <http://github.com/ElementaryFramework/Annotations/blob/master/LICENSE>
13+
* @version 0.0.1
514
*
6-
* (c) Rasmus Schultz <rasmus@mindplay.dk>
715
*
8-
* This software is licensed under the GNU LGPL license
9-
* for more information, please see:
16+
* This file was originally a part of the php-annotation framework.
17+
*
18+
* (c) Rasmus Schultz <rasmus@mindplay.dk>
1019
*
1120
* <https://github.com/mindplay-dk/php-annotations>
1221
*/
1322

14-
namespace mindplay\annotations;
23+
namespace ElementaryFramework\Annotations;
1524

1625
/**
1726
* This interface enables an Annotation to support PHP-DOC style Annotation

0 commit comments

Comments
 (0)