| @@ 34-102 (lines=69) @@ | ||
| 31 | * @link https://github.com/appserver-io-psr/epb |
|
| 32 | * @link http://www.appserver.io |
|
| 33 | */ |
|
| 34 | class Factory extends ReflectionAnnotation |
|
| 35 | { |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The annotation for a default timeout method. |
|
| 39 | * |
|
| 40 | * @var string |
|
| 41 | */ |
|
| 42 | const ANNOTATION = 'Factory'; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * This method returns the class name as |
|
| 46 | * a string. |
|
| 47 | * |
|
| 48 | * @return string |
|
| 49 | */ |
|
| 50 | public static function __getClass() |
|
| 51 | { |
|
| 52 | return __CLASS__; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Returns the value of the name attribute. |
|
| 57 | * |
|
| 58 | * @return string|null The annotations name attribute |
|
| 59 | */ |
|
| 60 | public function getName() |
|
| 61 | { |
|
| 62 | if (isset($this->values[AnnotationKeys::NAME])) { |
|
| 63 | return $this->values[AnnotationKeys::NAME]; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Returns the value of the description attribute. |
|
| 69 | * |
|
| 70 | * @return string|null The annotations description attribute |
|
| 71 | */ |
|
| 72 | public function getDescription() |
|
| 73 | { |
|
| 74 | if (isset($this->values[AnnotationKeys::DESCRIPTION])) { |
|
| 75 | return $this->values[AnnotationKeys::DESCRIPTION]; |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Returns the value of the type attribute. |
|
| 81 | * |
|
| 82 | * @return string The annotations type attribute |
|
| 83 | */ |
|
| 84 | public function getType() |
|
| 85 | { |
|
| 86 | if (isset($this->values[AnnotationKeys::TYPE])) { |
|
| 87 | return $this->values[AnnotationKeys::TYPE]; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * Returns the value of the factory method attribute. |
|
| 93 | * |
|
| 94 | * @return string The annotations factory method attribute |
|
| 95 | */ |
|
| 96 | public function getMethod() |
|
| 97 | { |
|
| 98 | if (isset($this->values[AnnotationKeys::METHOD])) { |
|
| 99 | return $this->values[AnnotationKeys::METHOD]; |
|
| 100 | } |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| @@ 34-102 (lines=69) @@ | ||
| 31 | * @link https://github.com/appserver-io-psr/epb |
|
| 32 | * @link http://www.appserver.io |
|
| 33 | */ |
|
| 34 | class Inject extends ReflectionAnnotation |
|
| 35 | { |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The annotation for a default timeout method. |
|
| 39 | * |
|
| 40 | * @var string |
|
| 41 | */ |
|
| 42 | const ANNOTATION = 'Inject'; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * This method returns the class name as |
|
| 46 | * a string. |
|
| 47 | * |
|
| 48 | * @return string |
|
| 49 | */ |
|
| 50 | public static function __getClass() |
|
| 51 | { |
|
| 52 | return __CLASS__; |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Returns the value of the name attribute. |
|
| 57 | * |
|
| 58 | * @return string|null The annotations name attribute |
|
| 59 | */ |
|
| 60 | public function getName() |
|
| 61 | { |
|
| 62 | if (isset($this->values[AnnotationKeys::NAME])) { |
|
| 63 | return $this->values[AnnotationKeys::NAME]; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Returns the value of the description attribute. |
|
| 69 | * |
|
| 70 | * @return string|null The annotations description attribute |
|
| 71 | */ |
|
| 72 | public function getDescription() |
|
| 73 | { |
|
| 74 | if (isset($this->values[AnnotationKeys::DESCRIPTION])) { |
|
| 75 | return $this->values[AnnotationKeys::DESCRIPTION]; |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Returns the value of the type attribute. |
|
| 81 | * |
|
| 82 | * @return string The annotations type attribute |
|
| 83 | */ |
|
| 84 | public function getType() |
|
| 85 | { |
|
| 86 | if (isset($this->values[AnnotationKeys::TYPE])) { |
|
| 87 | return $this->values[AnnotationKeys::TYPE]; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * Returns the value of the factory attribute. |
|
| 93 | * |
|
| 94 | * @return string The annotations factory attribute |
|
| 95 | */ |
|
| 96 | public function getFactory() |
|
| 97 | { |
|
| 98 | if (isset($this->values[AnnotationKeys::FACTORY])) { |
|
| 99 | return $this->values[AnnotationKeys::FACTORY]; |
|
| 100 | } |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| @@ 32-100 (lines=69) @@ | ||
| 29 | * @link https://github.com/appserver-io-psr/epb |
|
| 30 | * @link http://www.appserver.io |
|
| 31 | */ |
|
| 32 | class Resource extends AbstractBeanAnnotation |
|
| 33 | { |
|
| 34 | ||
| 35 | /** |
|
| 36 | * The annotation for method, a bean has to be injected. |
|
| 37 | * |
|
| 38 | * @var string |
|
| 39 | */ |
|
| 40 | const ANNOTATION = 'Resource'; |
|
| 41 | ||
| 42 | /** |
|
| 43 | * This method returns the class name as |
|
| 44 | * a string. |
|
| 45 | * |
|
| 46 | * @return string |
|
| 47 | */ |
|
| 48 | public static function __getClass() |
|
| 49 | { |
|
| 50 | return __CLASS__; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Returns the value of the type attribute. |
|
| 55 | * |
|
| 56 | * @return string The annotations type attribute |
|
| 57 | */ |
|
| 58 | public function getType() |
|
| 59 | { |
|
| 60 | if (isset($this->values[AnnotationKeys::TYPE])) { |
|
| 61 | return $this->values[AnnotationKeys::TYPE]; |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Returns the value of the bean interface attribute. |
|
| 67 | * |
|
| 68 | * @return string|null The annotations bean interface attribute |
|
| 69 | */ |
|
| 70 | public function getBeanInterface() |
|
| 71 | { |
|
| 72 | if (isset($this->values[AnnotationKeys::BEAN_INTERFACE])) { |
|
| 73 | return $this->values[AnnotationKeys::BEAN_INTERFACE]; |
|
| 74 | } |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Returns the value of the bean name attribute. |
|
| 79 | * |
|
| 80 | * @return string|null The annotations bean name attribute |
|
| 81 | */ |
|
| 82 | public function getBeanName() |
|
| 83 | { |
|
| 84 | if (isset($this->values[AnnotationKeys::BEAN_NAME])) { |
|
| 85 | return $this->values[AnnotationKeys::BEAN_NAME]; |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * Returns the value of the lookup name attribute. |
|
| 91 | * |
|
| 92 | * @return string|null The annotations lookup name attribute |
|
| 93 | */ |
|
| 94 | public function getLookup() |
|
| 95 | { |
|
| 96 | if (isset($this->values[AnnotationKeys::LOOKUP])) { |
|
| 97 | return $this->values[AnnotationKeys::LOOKUP]; |
|
| 98 | } |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||