-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a61a543
Showing
19 changed files
with
801 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/.idea | ||
/.settings | ||
/.buildpath | ||
/.project | ||
/.DS_Store | ||
/target | ||
/instance-src | ||
/vendor | ||
/build.properties | ||
/composer.lock | ||
/composer.phar | ||
/*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml |
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,24 @@ | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.4 | ||
|
||
before_install: | ||
- pecl install pthreads-beta | ||
- pecl install xdebug | ||
- pyrus install pear/PHP_CodeSniffer | ||
- phpenv rehash | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
|
||
before_script: | ||
- composer selfupdate | ||
|
||
script: | ||
- ant composer-init | ||
- ant build | ||
- php ocular.phar code-coverage:upload --format=php-clover $TRAVIS_BUILD_DIR/target/reports/unit/coverage/clover.xml | ||
|
||
notifications: | ||
email: info@appserver.io | ||
hipchat: 95d47a72c5372d4a0fef20048c3200@Appserver |
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,9 @@ | ||
# Version 0.1.0 | ||
|
||
## Bugfixes | ||
|
||
* None | ||
|
||
## Features | ||
|
||
* Initial Release |
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,17 @@ | ||
# PHP Enterprise Messaging | ||
|
||
[![Latest Stable Version](https://poser.pugx.org/appserver-io-psr/pms/v/stable.png)](https://packagist.org/packages/appserver-io-psr/pms) [![Total Downloads](https://poser.pugx.org/appserver-io-psr/pms/downloads.png)](https://packagist.org/packages/appserver-io-psr/pms) [![Latest Unstable Version](https://poser.pugx.org/appserver-io-psr/pms/v/unstable.png)](https://packagist.org/packages/appserver-io-psr/pms) [![License](https://poser.pugx.org/appserver-io-psr/pms/license.png)](https://packagist.org/packages/appserver-io-psr/pms) [![Build Status](https://travis-ci.org/appserver-io-psr/pms.png)](https://travis-ci.org/appserver-io-psr/pms) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/appserver-io-psr/pms/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/appserver-io-psr/pms/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/appserver-io-psr/pms/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/appserver-io-psr/pms/?branch=master) | ||
|
||
## Introduction | ||
|
||
Contains the PHP Enterprise Messaging classes and interfaces. | ||
|
||
## Usage | ||
|
||
Coming Soon! | ||
|
||
# External Links | ||
|
||
* Documentation at [appserver.io](http://docs.appserver.io) | ||
* Documentation on [GitHub](https://github.com/techdivision/TechDivision_AppserverDocumentation) | ||
* [Getting started](https://github.com/techdivision/TechDivision_AppserverDocumentation/tree/master/docs/getting-started) |
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,25 @@ | ||
<?php | ||
|
||
/** | ||
* bootstrap.php | ||
* | ||
* 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 | ||
* | ||
* @category Appserver | ||
* @package Psr | ||
* @subpackage Pms | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2014 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/pms | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
$loader = require 'vendor/autoload.php'; | ||
$loader->add('AppserverIo\\Psr\\Pms', 'src'); |
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,11 @@ | ||
#-------------------------------------------------------------------------------- | ||
# appserver-io/pms Build Default Properties | ||
# | ||
# @copyright Copyright (c) 2010 <info@appserver.io> - TechDivision GmbH | ||
# @license http://opensource.org/licenses/osl-3.0.php | ||
# Open Software License (OSL 3.0) | ||
# @author TechDivision GmbH - Core Team <core@appserver.io> | ||
#-------------------------------------------------------------------------------- | ||
|
||
# ---- Module Release Settings -------------------------------------------------- | ||
release.version = 0.1.0 |
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,60 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE project> | ||
<project name="appserver-io-psr/pms" default="composer-init" basedir="."> | ||
|
||
<!-- initialize ENV variable --> | ||
<property environment="env" /> | ||
|
||
<!-- initialize file based properties --> | ||
<property file="${basedir}/build.properties"/> | ||
<property file="${basedir}/build.default.properties"/> | ||
<property file="${basedir}/build.${os.family}.properties"/> | ||
|
||
<!-- initialize the library specific properties --> | ||
<property name="codepool" value="vendor"/> | ||
|
||
<!-- initialize the directory where we can find the real build files --> | ||
<property name="vendor.dir" value ="${basedir}/${codepool}" /> | ||
<property name="build.dir" value="${vendor.dir}/appserver-io/build" /> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Import the common build configuration file --> | ||
<!-- ==================================================================== --> | ||
<import file="${build.dir}/common.xml" optional="true"/> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Checks if composer has installed it's dependencies --> | ||
<!-- ==================================================================== --> | ||
<target name="is-composer-installed"> | ||
<condition property="composer.present"> | ||
<available file="${build.dir}" type="dir"/> | ||
</condition> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Installs all dependencies defined in composer.json --> | ||
<!-- ==================================================================== --> | ||
<target name="composer-install" depends="is-composer-installed" unless="composer.present" description="Installs all dependencies defined in composer.json"> | ||
<exec dir="${basedir}" executable="composer"> | ||
<arg line="--no-interaction --dev install"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ==================================================================== --> | ||
<!-- Updates composer dependencies defined in composer.json --> | ||
<!-- ==================================================================== --> | ||
<target name="composer-update" depends="is-composer-installed" if="composer.present" description="Updates composer dependencies defined in composer.json"> | ||
<exec dir="${basedir}" executable="composer"> | ||
<arg line="--no-interaction --dev update"/> | ||
</exec> | ||
</target> | ||
|
||
<!-- ===================================================================== --> | ||
<!-- Checks if the build- and deployment stub has already been initialized --> | ||
<!-- ===================================================================== --> | ||
<target name="composer-init"> | ||
<antcall target="composer-install"/> | ||
<antcall target="composer-update"/> | ||
</target> | ||
|
||
</project> |
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,40 @@ | ||
{ | ||
"name" : "appserver-io-psr/pms", | ||
"description" : "PSR containing Enterprise PHP Messaging classes and interfaces.", | ||
"homepage" : "https://github.com/appserver-io-psr/pms", | ||
"license" : "OSL-3.0", | ||
"require" : { | ||
"php" : ">=5.4.0" | ||
}, | ||
"require-dev" : { | ||
"appserver-io/build" : "0.2.*" | ||
}, | ||
"autoload" : { | ||
"psr-0" : { | ||
"AppserverIo\\Psr\\Pms" : [ | ||
"src/", | ||
"tests/" | ||
] | ||
} | ||
}, | ||
"config" : { | ||
"github-oauth" : { | ||
"github.com" : "604a3b5943228e434a5b52c2ba3cf72286d30db9" | ||
} | ||
}, | ||
"authors" : [{ | ||
"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/pms/issues", | ||
"source" : "https://github.com/appserver-io-psr/pms" | ||
}, | ||
"keywords" : [ | ||
"php enterprise messaging" | ||
] | ||
} |
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,25 @@ | ||
<phpunit> | ||
<testsuites> | ||
<testsuite name="appserver-io/pms PHPUnit testsuite"> | ||
<directory suffix="Test.php">tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
<exclude> | ||
<directory prefix="Mock">src</directory> | ||
<directory suffix="Test.php">src</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<!-- Code coverage report, optional --> | ||
<logging> | ||
<log type="coverage-html" target="target/reports/unit/coverage"/> | ||
<log type="coverage-clover" target="target/reports/unit/clover.xml"/> | ||
<log type="junit" target="target/reports/unit/junit.xml" logIncompleteSkipped="false"/> | ||
</logging> | ||
<php> | ||
<ini name="date.timezone" value="Europe/Berlin"/> | ||
</php> | ||
</phpunit> |
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,92 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\Pms\Message | ||
* | ||
* 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 | ||
* | ||
* @category Appserver | ||
* @package Psr | ||
* @subpackage Pms | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2014 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/pms | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\Pms; | ||
|
||
/** | ||
* The interface for all messages. | ||
* | ||
* @category Appserver | ||
* @package Psr | ||
* @subpackage Pms | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2014 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/pms | ||
* @link http://www.appserver.io | ||
*/ | ||
interface Message | ||
{ | ||
|
||
/** | ||
* Returns the destination queue. | ||
* | ||
* @return \AppserverIo\Psr\Pms\Queue The destination queue | ||
*/ | ||
public function getDestination(); | ||
|
||
/** | ||
* Returns the message id as an | ||
* hash value.. | ||
* | ||
* @return string The message id as hash value | ||
*/ | ||
public function getMessageId(); | ||
|
||
/** | ||
* Returns the message itself. | ||
* | ||
* @return Object The message depending on the type of the Message object | ||
*/ | ||
public function getMessage(); | ||
|
||
/** | ||
* Sets the unique session id. | ||
* | ||
* @param string $sessionId The uniquid id | ||
* | ||
* @return void | ||
*/ | ||
public function setSessionId($sessionId); | ||
|
||
/** | ||
* Returns the unique session id. | ||
* | ||
* @return string The uniquid id | ||
*/ | ||
public function getSessionId(); | ||
|
||
/** | ||
* Returns the parent message. | ||
* | ||
* @return \AppserverIo\Psr\Pms\Message The parent message | ||
*/ | ||
public function getParentMessage(); | ||
|
||
/** | ||
* Returns the message monitor. | ||
* | ||
* @return \AppserverIo\Psr\Pms\Monitor The monitor | ||
*/ | ||
public function getMessageMonitor(); | ||
} |
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,51 @@ | ||
<?php | ||
|
||
/** | ||
* AppserverIo\Psr\Pms\MessageListener | ||
* | ||
* 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 | ||
* | ||
* @category Appserver | ||
* @package Psr | ||
* @subpackage Pms | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2014 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/pms | ||
* @link http://www.appserver.io | ||
*/ | ||
|
||
namespace AppserverIo\Psr\Pms; | ||
|
||
/** | ||
* The interface for all message receivers. | ||
* | ||
* @category Appserver | ||
* @package Psr | ||
* @subpackage Pms | ||
* @author Tim Wagner <tw@appserver.io> | ||
* @copyright 2014 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/pms | ||
* @link http://www.appserver.io | ||
*/ | ||
interface MessageListener | ||
{ | ||
|
||
/** | ||
* This function is invoked by the MessageQueue if a message | ||
* related to the receiver was received. | ||
* | ||
* @param \AppserverIo\Psr\Pms\Message $message The message itself | ||
* @param string $sessionId The session ID | ||
* | ||
* @return void | ||
*/ | ||
public function onMessage(Message $message, $sessionId); | ||
} |
Oops, something went wrong.