@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | $this->getListeners( |
| 33 | 33 | $name, |
| 34 | 34 | $object |
| 35 | - ), |
|
| 36 | - $object->getContent() |
|
| 37 | - ); |
|
| 35 | + ), |
|
| 36 | + $object->getContent() |
|
| 37 | + ); |
|
| 38 | 38 | }else{
|
| 39 | 39 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
|
| 40 | 40 | } |
@@ -43,18 +43,18 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | } //put your code here |
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * Creates an event-object with given object as content/subject and notifies |
|
| 48 | - * all registers listeners of the event. |
|
| 49 | - * |
|
| 50 | - * @access public |
|
| 51 | - * @param string $name name of the event |
|
| 52 | - * @param object $object the subject of the event |
|
| 53 | - * @param array $headers headers of the event-object as key/value pairs |
|
| 54 | - * @param string $eventClass event-class to create instances from |
|
| 55 | - * @return |
|
| 56 | - * @see EventBuilder |
|
| 57 | - */ |
|
| 46 | + /** |
|
| 47 | + * Creates an event-object with given object as content/subject and notifies |
|
| 48 | + * all registers listeners of the event. |
|
| 49 | + * |
|
| 50 | + * @access public |
|
| 51 | + * @param string $name name of the event |
|
| 52 | + * @param object $object the subject of the event |
|
| 53 | + * @param array $headers headers of the event-object as key/value pairs |
|
| 54 | + * @param string $eventClass event-class to create instances from |
|
| 55 | + * @return |
|
| 56 | + * @see EventBuilder |
|
| 57 | + */ |
|
| 58 | 58 | public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){
|
| 59 | 59 | if(!$this->hasListeners($name, ($object))){
|
| 60 | 60 | return false; |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | Reflection_Pool::getInstance( |
| 68 | 68 | $object->getContent() |
| 69 | 69 | ) |
| 70 | - ), |
|
| 71 | - $object |
|
| 72 | - ); |
|
| 70 | + ), |
|
| 71 | + $object |
|
| 72 | + ); |
|
| 73 | 73 | }else{
|
| 74 | 74 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
|
| 75 | 75 | } |
@@ -78,18 +78,18 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | } //put your code here |
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * Creates an event-object with given object as content/subject and notifies |
|
| 83 | - * all registers listeners of the event. |
|
| 84 | - * |
|
| 85 | - * @access public |
|
| 86 | - * @param string $name name of the event |
|
| 87 | - * @param object $object the subject of the event |
|
| 88 | - * @param array $headers headers of the event-object as key/value pairs |
|
| 89 | - * @param string $eventClass event-class to create instances from |
|
| 90 | - * @return |
|
| 91 | - * @see EventBuilder |
|
| 92 | - */ |
|
| 81 | + /** |
|
| 82 | + * Creates an event-object with given object as content/subject and notifies |
|
| 83 | + * all registers listeners of the event. |
|
| 84 | + * |
|
| 85 | + * @access public |
|
| 86 | + * @param string $name name of the event |
|
| 87 | + * @param object $object the subject of the event |
|
| 88 | + * @param array $headers headers of the event-object as key/value pairs |
|
| 89 | + * @param string $eventClass event-class to create instances from |
|
| 90 | + * @return |
|
| 91 | + * @see EventBuilder |
|
| 92 | + */ |
|
| 93 | 93 | public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){
|
| 94 | 94 | if(!$this->hasListeners($name, ($object))){
|
| 95 | 95 | return false; |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | protected static function doNotifyUntil(array $listeners, $subject){
|
| 62 | 62 | foreach ($listeners as $listener){
|
| 63 | - if (self::doNotifyOne($listener, $subject)){
|
|
| 63 | + if (self::doNotifyOne($listener, $subject)){
|
|
| 64 | 64 | return $listener; |
| 65 | - } |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | return NULL; |
| 68 | 68 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function connect($name, $listener){
|
| 48 | 48 | Test::ensureHandler($listener); |
| 49 | 49 | if (!$this->hasListeners($name)){
|
| 50 | - $this->listeners[$name] = array(); |
|
| 50 | + $this->listeners[$name] = array(); |
|
| 51 | 51 | } |
| 52 | 52 | $this->listeners[$name][] = $listener; |
| 53 | 53 | return true; |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | $res = false; |
| 69 | 69 | foreach ($this->listeners[$name] as $i => $callable){
|
| 70 | - if ($listener === $callable){
|
|
| 70 | + if ($listener === $callable){
|
|
| 71 | 71 | unset($this->listeners[$name][$i]); |
| 72 | 72 | $res = true; |
| 73 | - } |
|
| 73 | + } |
|
| 74 | 74 | } |
| 75 | 75 | return $res; |
| 76 | 76 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | |
| 24 | - class PollableChannel |
|
| 24 | + class PollableChannel |
|
| 25 | 25 | extends \PEIP\ABS\Channel\Channel |
| 26 | 26 | implements \PEIP\INF\Channel\PollableChannel {
|
| 27 | 27 | |
@@ -47,18 +47,18 @@ |
||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * Builds and modifies an arbitrary service/object instance from a config-obect. |
|
| 52 | - * |
|
| 53 | - * @see XMLContext::doBuild |
|
| 54 | - * @see XMLContext::modifyService |
|
| 55 | - * @implements \PEIP\INF\Context\Context |
|
| 56 | - * @access public |
|
| 57 | - * @param object $config configuration object to build a service instance from. |
|
| 58 | - * @param array $arguments arguments for the service constructor |
|
| 59 | - * @param string $defaultClass class to create instance for if none is set in config |
|
| 60 | - * @return object build and modified srvice instance |
|
| 61 | - */ |
|
| 50 | + /** |
|
| 51 | + * Builds and modifies an arbitrary service/object instance from a config-obect. |
|
| 52 | + * |
|
| 53 | + * @see XMLContext::doBuild |
|
| 54 | + * @see XMLContext::modifyService |
|
| 55 | + * @implements \PEIP\INF\Context\Context |
|
| 56 | + * @access public |
|
| 57 | + * @param object $config configuration object to build a service instance from. |
|
| 58 | + * @param array $arguments arguments for the service constructor |
|
| 59 | + * @param string $defaultClass class to create instance for if none is set in config |
|
| 60 | + * @return object build and modified srvice instance |
|
| 61 | + */ |
|
| 62 | 62 | public function buildAndModify($config, $arguments, $defaultClass = false){
|
| 63 | 63 | return ServiceFactory::buildAndModify($config, $arguments, $defaultClass); |
| 64 | 64 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @return |
| 44 | 44 | */ |
| 45 | 45 | public function handle($message){
|
| 46 | - $this->doHandle($this->getMessageFromObject($message)); |
|
| 46 | + $this->doHandle($this->getMessageFromObject($message)); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | && $object->getName() == 'postSend' |
| 91 | 91 | && $object->hasHeader(Pipe::HEADER_MESSAGE) |
| 92 | 92 | && $content instanceof \PEIP\INF\Channel\PollableChannel |
| 93 | - ){
|
|
| 93 | + ){
|
|
| 94 | 94 | $object = $content->receive(); |
| 95 | 95 | } |
| 96 | 96 | if (!($object instanceof \PEIP\INF\Message\Message)) {
|
@@ -76,11 +76,11 @@ |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * returns all headers of the message |
|
| 80 | - * |
|
| 81 | - * @access public |
|
| 82 | - * @return ArrayAccess ArrayAccess object of headers |
|
| 83 | - */ |
|
| 79 | + * returns all headers of the message |
|
| 80 | + * |
|
| 81 | + * @access public |
|
| 82 | + * @return ArrayAccess ArrayAccess object of headers |
|
| 83 | + */ |
|
| 84 | 84 | public function getHeaders(){
|
| 85 | 85 | return (array) $this->headers; |
| 86 | 86 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function setParameters($namespace, array $parameters){
|
| 76 | 76 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 77 | - } |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function addParameters($namespace, array $parameters){
|
| 87 | 87 | $this->getParameterHolderOrCreate($namespace)->addParameters($parameters); |
| 88 | - } |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function getParameters($namespace){
|
| 104 | 104 | $this->getParameterHolderOrCreate($namespace)->getParameters(); |
| 105 | - } |
|
| 105 | + } |
|
| 106 | 106 | |
| 107 | 107 | |
| 108 | 108 | /** |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function getParameter($namespace, $name){
|
| 115 | 115 | $this->getParameterHolderOrCreate($namespace)->getParameter($name); |
| 116 | - } |
|
| 116 | + } |
|
| 117 | 117 | |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function setParameter($namespace, $name, $value){
|
| 127 | 127 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 128 | - } |
|
| 128 | + } |
|
| 129 | 129 | |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | public function hasParameter($namespace, $name){
|
| 138 | 138 | $this->getParameterHolderOrCreate($namespace)->hasParameter($name); |
| 139 | - } |
|
| 139 | + } |
|
| 140 | 140 | |
| 141 | 141 | |
| 142 | 142 | /** |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function deleteParameter($namespace, $name){
|
| 149 | 149 | $this->getParameterHolderOrCreate($namespace)->setParameters($parameters); |
| 150 | - } |
|
| 150 | + } |
|
| 151 | 151 | |
| 152 | 152 | |
| 153 | 153 | /** |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder){
|
| 168 | 168 | $this->stores[$namespace] = $holder; |
| 169 | - } |
|
| 169 | + } |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | /** |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function getParameterHolder($namespace){
|
| 185 | 185 | return $this->stores[$namespace]; |
| 186 | - } |
|
| 186 | + } |
|
| 187 | 187 | |
| 188 | 188 | |
| 189 | 189 | /** |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function hasParameterHolder($namespace){
|
| 202 | 202 | return array_key_exists($namespace, $this->stores); |
| 203 | - } |
|
| 203 | + } |
|
| 204 | 204 | |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | public function deleteParameterHolder($namespace){
|
| 219 | 219 | unset($this->stores[$namespace]); |
| 220 | - } |
|
| 220 | + } |
|
| 221 | 221 | |
| 222 | 222 | |
| 223 | 223 | |