@@ -80,7 +80,6 @@ |
||
80 | 80 | * |
81 | 81 | * @access public |
82 | 82 | * @param string $name name of the event |
83 | - * @param Callable|PEIP\INF\Handler\Handler $listener listener to connect |
|
84 | 83 | * @return |
85 | 84 | */ |
86 | 85 | public function disconnectAll($name){ |
@@ -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 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * @see PEIP\ABS\Handler\MessageHandler::doSetInputChannel |
55 | 55 | * @access public |
56 | 56 | * @param \PEIP\INF\Channel\Channel $inputChannel the input-channel |
57 | - * @return PEIP\ABS\Handler\MessageHandler $this; |
|
57 | + * @return MessageHandler $this; |
|
58 | 58 | */ |
59 | 59 | public function setInputChannel(\PEIP\INF\Channel\Channel $inputChannel){ |
60 | 60 | $this->doSetInputChannel($inputChannel); |
@@ -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)) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * Connects the handler to the output-channel. |
54 | 54 | * |
55 | 55 | * @access protected |
56 | - * @param \PEIP\INF\Channel\Channel $inputChannel the output-channel to connect the handler to |
|
56 | + * @param \PEIP\INF\Channel\Channel $outputChannel the output-channel to connect the handler to |
|
57 | 57 | * @return |
58 | 58 | */ |
59 | 59 | protected function doSetOutputChannel(\PEIP\INF\Channel\Channel $outputChannel){ |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * |
163 | 163 | * @access public |
164 | 164 | * @param string $messageClass name of the message-class to create reply-messages from. |
165 | - * @return PEIP\ABS\Handler\ReplyProducingMessageHandler $this |
|
165 | + * @return ReplyProducingMessageHandler $this |
|
166 | 166 | */ |
167 | 167 | public function setMessageClass($messageClass){ |
168 | 168 | $this->messageClass = $messageClass; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * |
196 | 196 | * @access public |
197 | 197 | * @param array $headerNames array of message-header names to look for a reply-channel |
198 | - * @return PEIP\ABS\Handler\ReplyProducingMessageHandler $this |
|
198 | + * @return ReplyProducingMessageHandler $this |
|
199 | 199 | */ |
200 | 200 | public function setReplyChannelHeaders(array $headerNames){ |
201 | 201 | $this->replyChannelHeaders = $headerNames; |
@@ -66,7 +66,8 @@ |
||
66 | 66 | * Scans a directory recursively for php-files and adds them to autoload |
67 | 67 | * |
68 | 68 | * @access public |
69 | - * @param string directoy to scan |
|
69 | + * @param string directoy to scan |
|
70 | + * @param string $dir |
|
70 | 71 | * @return void |
71 | 72 | */ |
72 | 73 | public function scanDirectory($dir){ |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * |
40 | 40 | * @access public |
41 | 41 | * @param string $className class-name to create objects for |
42 | - * @param ReflectionClass $reflectionClass reflection-class for class. default: NULL |
|
42 | + * @param \ReflectionClass $reflectionClass reflection-class for class. default: NULL |
|
43 | 43 | * @param boolean $storeRef wether to store a reference for new instance. default: true |
44 | 44 | * @return |
45 | 45 | */ |
@@ -174,7 +174,6 @@ discard block |
||
174 | 174 | * </config> |
175 | 175 | * |
176 | 176 | * @access public |
177 | - * @param XMLContext $config the config to include |
|
178 | 177 | */ |
179 | 178 | public function includeContext(XMLContext $context){ |
180 | 179 | $this->services = array_merge($this->services, $context->getServices()); |
@@ -185,7 +184,7 @@ discard block |
||
185 | 184 | * |
186 | 185 | * @see XMLContext::includeContext |
187 | 186 | * @access public |
188 | - * @param XMLContext $context the config to include |
|
187 | + * @param string $filePath |
|
189 | 188 | */ |
190 | 189 | public function includeContextFromFile($filePath){ |
191 | 190 | if(file_exists($filePath)){ |
@@ -693,7 +692,7 @@ discard block |
||
693 | 692 | * |
694 | 693 | * @access protected |
695 | 694 | * @param object $config configuration object to create arguments from. |
696 | - * @return mixed build arguments |
|
695 | + * @return \PEIP\INF\Channel\Channel[] build arguments |
|
697 | 696 | */ |
698 | 697 | protected function getReplyHandlerArguments($config){ |
699 | 698 | $args = array( |
@@ -738,7 +737,8 @@ discard block |
||
738 | 737 | * |
739 | 738 | * @access protected |
740 | 739 | * @param string the configuration type ofthe channel (e.g.: 'reply', 'request') |
741 | - * @param object $config configuration object to return channel from. |
|
740 | + * @param object $config configuration object to return channel from. |
|
741 | + * @param string $type |
|
742 | 742 | * @return \PEIP\INF\Channel\Channel reply-channel |
743 | 743 | */ |
744 | 744 | public function doGetChannel($type, $config){ |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | * @see GenericBuilder |
834 | 834 | * @static |
835 | 835 | * @access protected |
836 | - * @param object $className name of class to build instance for. |
|
836 | + * @param string $className name of class to build instance for. |
|
837 | 837 | * @param array $arguments arguments for the constructor |
838 | 838 | * @return object build and modified srvice instance |
839 | 839 | */ |
@@ -841,6 +841,10 @@ discard block |
||
841 | 841 | return GenericBuilder::getInstance($className)->build($arguments); |
842 | 842 | } |
843 | 843 | |
844 | + /** |
|
845 | + * @param string $type |
|
846 | + * @param string $name |
|
847 | + */ |
|
844 | 848 | protected static function hasPublicProperty($service, $type, $name){ |
845 | 849 | $reflection = GenericBuilder::getInstance(get_class($service))->getReflectionClass(); |
846 | 850 | if($reflection->{'has'.$type}($name) && $reflection->{'get'.$type}($name)->isPublic()){ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param callable $callable a callable which creates instances for node-name |
135 | 135 | */ |
136 | 136 | public function registerNodeBuilder($nodeName, $callable){ |
137 | - return $this->getServiceProvider()->registerNodeBuilder($nodeName, $callable); |
|
137 | + return $this->getServiceProvider()->registerNodeBuilder($nodeName, $callable); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | */ |
770 | 770 | public function buildAndModify($config, $arguments, $defaultClass = false){ |
771 | 771 | if("" != (string)$config["class"] || $defaultClass){ |
772 | - $service = ServiceFactory::doBuild($config, $arguments, $defaultClass); |
|
772 | + $service = ServiceFactory::doBuild($config, $arguments, $defaultClass); |
|
773 | 773 | }elseif($config["ref"]){ |
774 | 774 | $service = $this->getService((string)$config['ref']); |
775 | 775 | }else{ |
@@ -71,7 +71,6 @@ |
||
71 | 71 | * notifies all listeners on a event on a subject |
72 | 72 | * |
73 | 73 | * @access public |
74 | - * @param string $name name of the event |
|
75 | 74 | * @param mixed $subject the subject |
76 | 75 | * @return |
77 | 76 | */ |
@@ -65,7 +65,6 @@ |
||
65 | 65 | * Disconnects all listeners. |
66 | 66 | * |
67 | 67 | * @access public |
68 | - * @param Callable|PEIP\INF\Handler\Handler $listener |
|
69 | 68 | * @return void |
70 | 69 | */ |
71 | 70 | public function disconnectAll(){ |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @access public |
24 | 24 | * @param string $name name of the event |
25 | 25 | * @param \PEIP\INF\Event\Event $object an event object |
26 | - * @return boolean |
|
26 | + * @return boolean|null |
|
27 | 27 | */ |
28 | 28 | public function notify($name, $object){ |
29 | 29 | if($object instanceof \PEIP\INF\Event\Event){ |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param array $headers headers of the event-object as key/value pairs |
54 | 54 | * @param string $eventClass event-class to create instances from |
55 | 55 | * @return |
56 | - * @see EventBuilder |
|
56 | + boolean|null @see EventBuilder |
|
57 | 57 | */ |
58 | 58 | public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){ |
59 | 59 | if(!$this->hasListeners($name, ($object))){ |
@@ -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; |