/**
  * Do domain watcher
  *
  * If an existing entity is already stored in the domain watcher, return this entity in
  * preference to the newly created one.
  *
  * @param Domain\AbstractDomain $object
  * @return Domain\AbstractDomain
  */
 protected final function doDomainWatcher(Domain\AbstractDomain $object)
 {
     if ($exists = $this->watcher->exists($this->getShortType($object), $object->getId())) {
         return $exists;
     }
     $this->watcher->add($object);
     return $object;
 }
Example #2
0
<?php

return array('router' => array('routes' => array('home' => array('type' => 'Zend\\Mvc\\Router\\Http\\Literal', 'options' => array('route' => '/', 'defaults' => array('controller' => 'Core\\Controller\\Index', 'action' => 'index'))), 'application' => array('type' => 'Literal', 'options' => array('route' => '/application', 'defaults' => array('__NAMESPACE__' => 'Core\\Controller', 'controller' => 'Index', 'action' => 'index')), 'may_terminate' => true, 'child_routes' => array('default' => array('type' => 'Segment', 'options' => array('route' => '/[:controller[/:action]]', 'constraints' => array('controller' => '[a-zA-Z][a-zA-Z0-9_-]*', 'action' => '[a-zA-Z][a-zA-Z0-9_-]*'), 'defaults' => array())))))), 'service_manager' => array('services' => array('Core\\Watcher' => \Core\Domain\DomainWatcher::getInstance()), 'factories' => array('Core\\Log' => function ($sm) {
    $logger = new \Zend\Log\Logger();
    $logger->addWriter('stream', null, array('stream' => 'data/logs/core.log'));
    return $logger;
}), 'abstract_factories' => array('Core\\Service\\ServiceLoader', 'Core\\Domain\\Factory\\FactoryLoader')), 'controllers' => array('invokables' => array('Core\\Controller\\Index' => 'Core\\Controller\\IndexController')), 'view_manager' => array('display_not_found_reason' => true, 'display_exceptions' => true, 'doctype' => 'HTML5', 'not_found_template' => 'error/404', 'exception_template' => 'error/index', 'template_map' => array('layout/layout' => __DIR__ . '/../view/layout/layout.phtml', 'core/index/index' => __DIR__ . '/../view/core/index/index.phtml', 'error/404' => __DIR__ . '/../view/error/404.phtml', 'error/index' => __DIR__ . '/../view/error/index.phtml'), 'template_path_stack' => array(__DIR__ . '/../view')), 'console' => array('router' => array('routes' => array())));