Skip to content

Commit

Permalink
Merge pull request #26 from wagnert/master
Browse files Browse the repository at this point in the history
Add Fixture and Migration annotations + Method descriptor interfaces …
  • Loading branch information
wagnert committed May 17, 2018
2 parents 0f351bd + 20398f2 commit 581e4b2
Show file tree
Hide file tree
Showing 15 changed files with 589 additions and 41 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Version 6.0.0

## Bugfixes

* None

## Features

* Add Fixture and Migration annotations
* Method descriptor interfaces from appserver-io/description to this repository

# Version 5.0.0

## Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion build.default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
#--------------------------------------------------------------------------------

# ---- Module Release Settings --------------------------------------------------
release.version = 5.0.0
release.version = 6.0.0
82 changes: 43 additions & 39 deletions composer.json
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 src/AppserverIo/Psr/EnterpriseBeans/Annotations/Fixture.php
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 src/AppserverIo/Psr/EnterpriseBeans/Annotations/Migration.php
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'];
}
}
}
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();
}
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
{
}
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();
}

0 comments on commit 581e4b2

Please sign in to comment.