This file contains hidden or 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
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace MCN; | |
use Zend\Log\Logger, |
This file contains hidden or 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
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace MCNCore\Object; | |
use Zend\Mvc\MvcEvent, |
This file contains hidden or 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
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace Company\Controller; | |
use Zend\View\Model\ViewModel, |
This file contains hidden or 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
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace MCNCore\Object; | |
use Zend\Mvc\MvcEvent, |
This file contains hidden or 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
// Override the ZDT_DbCollector | |
'ZDT_DbCollector' => function($sm) { | |
$logs = $sm->get('doctrine.entitymanager.orm_default'); | |
->getConnection() | |
->getConfiguration() | |
->getSQLLogger(); | |
return new \MCNCore\Object\Profiler($logs); | |
} |
This file contains hidden or 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
<?php | |
/** | |
* @author Antoine Hedgecock <[email protected]> | |
*/ | |
/** | |
* @namespace | |
*/ | |
namespace User\Form\Fieldsets; | |
use Zend\Form\Fieldset, |
This file contains hidden or 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
$sm->get('view_manager') | |
->getHelperManager() | |
->addInitializer(function($instance) use ($sm) { | |
if ($instance instanceof ServiceLocatorAwareInterface) { | |
$instance->setServiceLocator($sm); | |
} | |
}); |
This file contains hidden or 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
/** | |
* Sets one or multiple options | |
* | |
* @param array|Traversable $options Options to set | |
* @throws Exception\InvalidArgumentException If $options is not an array or Traversable | |
* @return AbstractValidator Provides fluid interface | |
*/ | |
public function setOptions($options = array()) | |
{ |
This file contains hidden or 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
public function setServiceManager(ServiceManager $serviceManager) | |
{ | |
$this->get('user') | |
->setHydrator($serviceManager->get('entityHydrator')); | |
$filter = $this->getInputFilter(); | |
// We need to add a few filters | |
$email = $filter->get('user') | |
->get('email'); |
This file contains hidden or 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
->add( | |
array( | |
'name' => 'email', | |
'validators' => array( | |
array( | |
'name' => 'callback', | |
'priority' => PHP_INT_MAX, | |
'options' => array( | |
'callback' => function($fo) { |