-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from wagnert/master
Add Fixture and Migration annotations + Method descriptor interfaces …
- Loading branch information
Showing
15 changed files
with
589 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
{ | ||
"name" : "appserver-io-psr/epb", | ||
"description" : "PSR containing Enterprise PHP Beans classes and interfaces.", | ||
"homepage" : "https://github.com/appserver-io-psr/epb", | ||
"license" : "OSL-3.0", | ||
"require" : { | ||
"php" : ">=5.5.0", | ||
"appserver-io/lang" : "~3.0" | ||
}, | ||
"require-dev" : { | ||
"appserver-io/build" : "~1.0" | ||
}, | ||
"autoload" : { | ||
"psr-0" : { | ||
"AppserverIo\\Psr\\EnterpriseBeans" : [ | ||
"src/", | ||
"tests/" | ||
] | ||
} | ||
}, | ||
"authors" : [{ | ||
"name" : "Johann Zelger", | ||
"email" : "jz@appserver.io", | ||
"homepage" : "https://github.com/zelgerj", | ||
"role" : "Developer" | ||
}, { | ||
"name" : "Tim Wagner", | ||
"email" : "tw@appserver.io", | ||
"homepage" : "https://github.com/wagnert", | ||
"role" : "Developer" | ||
} | ||
], | ||
"support" : { | ||
"email" : "t.wagner@techdivision.com", | ||
"issues" : "https://github.com/appserver-io-psr/epb/issues", | ||
"source" : "https://github.com/appserver-io-psr/epb" | ||
}, | ||
"keywords" : [ | ||
"php enterprise beans" | ||
] | ||
"name": "appserver-io-psr/epb", | ||
"description": "PSR containing Enterprise PHP Beans classes and interfaces.", | ||
"homepage": "https://github.com/appserver-io-psr/epb", | ||
"license": "OSL-3.0", | ||
"require": { | ||
"php": ">=5.5.0", | ||
"appserver-io/lang": "~3.0", | ||
"appserver-io/storage": "2.0.*", | ||
"appserver-io-psr/application": "1.4.*" | ||
}, | ||
"require-dev": { | ||
"appserver-io/build": "~1.0" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"AppserverIo\\Psr\\EnterpriseBeans": [ | ||
"src/", | ||
"tests/" | ||
] | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Johann Zelger", | ||
"email": "jz@appserver.io", | ||
"homepage": "https://github.com/zelgerj", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Tim Wagner", | ||
"email": "tw@appserver.io", | ||
"homepage": "https://github.com/wagnert", | ||
"role": "Developer" | ||
} | ||
], | ||
"support": { | ||
"email": "t.wagner@techdivision.com", | ||
"issues": "https://github.com/appserver-io-psr/epb/issues", | ||
"source": "https://github.com/appserver-io-psr/epb" | ||
}, | ||
"keywords": [ | ||
"php enterprise beans" | ||
] | ||
} |
64 changes: 64 additions & 0 deletions
64
src/AppserverIo/Psr/EnterpriseBeans/Annotations/Fixture.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\EnterpriseBeans\Annotations\Fixture | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\EnterpriseBeans\Annotations; | ||
|
||
/** | ||
* Annotation to map a Doctrine Fixture. | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
class Fixture extends AbstractBeanAnnotation | ||
{ | ||
|
||
/** | ||
* The annotation to define Doctrine Migration version. | ||
* | ||
* @var string | ||
*/ | ||
const ANNOTATION = 'Fixture'; | ||
|
||
/** | ||
* This method returns the class name as | ||
* a string. | ||
* | ||
* @return string | ||
*/ | ||
public static function __getClass() | ||
{ | ||
return __CLASS__; | ||
} | ||
|
||
/** | ||
* Returns the value of the name attribute. | ||
* | ||
* @return string|null The annotations name attribute | ||
*/ | ||
public function getName() | ||
{ | ||
if (isset($this->values['name'])) { | ||
return $this->values['name']; | ||
} | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
src/AppserverIo/Psr/EnterpriseBeans/Annotations/Migration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\EnterpriseBeans\Annotations\Migration | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\EnterpriseBeans\Annotations; | ||
|
||
/** | ||
* Annotation to map a Doctrine Migration version. | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
class Migration extends AbstractBeanAnnotation | ||
{ | ||
|
||
/** | ||
* The annotation to define Doctrine Migration version. | ||
* | ||
* @var string | ||
*/ | ||
const ANNOTATION = 'Migration'; | ||
|
||
/** | ||
* This method returns the class name as | ||
* a string. | ||
* | ||
* @return string | ||
*/ | ||
public static function __getClass() | ||
{ | ||
return __CLASS__; | ||
} | ||
|
||
/** | ||
* Returns the value of the name attribute. | ||
* | ||
* @return string|null The annotations name attribute | ||
*/ | ||
public function getName() | ||
{ | ||
if (isset($this->values['name'])) { | ||
return $this->values['name']; | ||
} | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/AppserverIo/Psr/EnterpriseBeans/Description/FactoryAwareDescriptorInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\EnterpriseBeans\Description\FactoryAwareDescriptorInterface | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\EnterpriseBeans\Description; | ||
|
||
/** | ||
* Interface for factory aware descriptor implementations. | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
interface FactoryAwareDescriptorInterface | ||
{ | ||
|
||
/** | ||
* Sets the factory that creates the bean. | ||
* | ||
* @param \AppserverIo\Psr\EnterpriseBeans\Description\FactoryDescriptorInterface $factory The bean's factory | ||
* | ||
* @return void | ||
*/ | ||
public function setFactory(FactoryDescriptorInterface $factory); | ||
|
||
/** | ||
* Returns the factory that creates the bean. | ||
* | ||
* @return \AppserverIo\Psr\EnterpriseBeans\Description\FactoryDescriptorInterface The bean's factory | ||
*/ | ||
public function getFactory(); | ||
} |
34 changes: 34 additions & 0 deletions
34
src/AppserverIo/Psr/EnterpriseBeans/Description/FixtureDescriptorInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\EnterpriseBeans\Description\FixtureDescriptorInterface | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\EnterpriseBeans\Description; | ||
|
||
/** | ||
* Interface for fixture descriptor implementations. | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
interface FixtureDescriptorInterface extends BeanDescriptorInterface | ||
{ | ||
} |
52 changes: 52 additions & 0 deletions
52
src/AppserverIo/Psr/EnterpriseBeans/Description/MethodInvocationAwareDescriptorInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\EnterpriseBeans\Description\MethodInvocationAwareDescriptorInterface | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* PHP version 5 | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\EnterpriseBeans\Description; | ||
|
||
/** | ||
* Interface for factory aware descriptor implementations. | ||
* | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2018 TechDivision GmbH <info@appserver.io> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @link https://github.com/appserver-io-psr/epb | ||
* @link http://www.appserver.io | ||
*/ | ||
interface MethodInvocationAwareDescriptorInterface | ||
{ | ||
|
||
/** | ||
* Add's the passed method to the methods that'll be invoked when the | ||
* instance has been created. | ||
* | ||
* @param \AppserverIo\Psr\EnterpriseBeans\Description\MethodInvocationDescriptorInterface $method The method descriptor to add | ||
* | ||
* @return void | ||
*/ | ||
public function addMethodInvocation(MethodInvocationDescriptorInterface $method); | ||
|
||
/** | ||
* Returns the array with the methods that'll be invoked when the | ||
* instance has been created. | ||
* | ||
* @return array The array with the methods descriptors | ||
*/ | ||
public function getMethodInvocations(); | ||
} |
Oops, something went wrong.