Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/session-validation-compat'
Browse files Browse the repository at this point in the history
Close #146
  • Loading branch information
Ocramius committed Apr 16, 2014
2 parents 1a0e780 + 3080d1b commit 9f93fae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace ZendDeveloperTools\Collector;

use Zend\EventManager\Event;

/**
* Event Data Collector Interface.
*
Expand Down
1 change: 0 additions & 1 deletion src/ZendDeveloperTools/Collector/MemoryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class MemoryCollector extends AbstractCollector implements EventCollectorInterface
{

/**
* @inheritdoc
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
class EventLoggingListenerAggregate implements SharedListenerAggregateInterface
{

/**
*
* @var ServiceLocatorInterface
Expand Down Expand Up @@ -98,20 +97,26 @@ public function detachShared(SharedEventManagerInterface $events)
*/
public function onCollectEvent(Event $event)
{
$strict = $this->options->isStrict();
$strict = $this->options->isStrict();
$collectors = $this->options->getEventCollectors();

foreach ($collectors as $name => $collector) {
foreach ($collectors as $collector) {
if ($this->serviceLocator->has($collector)) {
$this->serviceLocator->get($collector)->collectEvent('application', $event);
/* @var $currentCollector \ZendDeveloperTools\Collector\EventCollectorInterface */
$currentCollector = $this->serviceLocator->get($collector);

$currentCollector->collectEvent('application', $event);
} else {
$error = sprintf('Unable to fetch or create an instance for %s.', $collector);

if ($strict === true) {
throw new ServiceNotFoundException($error);
} else {
$this->report->addError($error);
}
}
}

return true; // @TODO workaround, to be removed when https://github.com/zendframework/zf2/pull/6147 is fixed
}
}

0 comments on commit 9f93fae

Please sign in to comment.