This file contains 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
$eventManager->attach( MvcEvent::EVENT_DISPATCH, function( MvcEvent $e ){ | |
$route_name = 'something'; | |
$new_template = 'something-else'; | |
if( $e->getRouteMatch() && $e->getRouteMatch()->getMatchedRouteName() == $route_name ) | |
$e->getViewModel()->setTemplate( $new_template ); | |
}); |
This file contains 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 | |
namespace ApplicationTest; | |
use Zend\Loader\AutoloaderFactory; | |
use Zend\Mvc\Service\ServiceManagerConfig; | |
use Zend\ServiceManager\ServiceManager; | |
use RuntimeException; | |
error_reporting(E_ALL | E_STRICT); |
This file contains 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
/** | |
* Class UserFormFactory | |
* @package CirclicalUser\Factory\Form | |
*/ | |
class UserFormFactory implements FactoryInterface, MutableCreationOptionsInterface | |
{ | |
/** | |
* @var array | |
*/ |
This file contains 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
protected static function initAutoloader() | |
{ | |
$vendorPath = static::findParentPath('vendor'); | |
if (file_exists($vendorPath . '/autoload.php')) { | |
include $vendorPath . '/autoload.php'; | |
} | |
include $vendorPath . '/zendframework/zend-loader/src/AutoloaderFactory.php'; | |
AutoloaderFactory::factory(array( |
This file contains 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 | |
class Foo | |
{ | |
const COOKIE_KEY = '839914B48AE583605F004C784FEF155B39A2C142AD7A747582160E6C14E7EF16'; | |
const COOKIE_IV = '864C9BB8032792391B88C76CF73276F2'; | |
public function encrypt( $what ) | |
{ |
This file contains 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
namespace Application\Factory\Controller; | |
use Zend\ServiceManager\AbstractFactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class AbstractControllerFactory implements AbstractFactoryInterface | |
{ | |
/** | |
* Determine if we can create a service with name |
This file contains 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 | |
class LazyControllerFactory implements AbstractFactoryInterface | |
{ | |
/** | |
* Determine if we can create a service with name | |
* | |
* @param ServiceLocatorInterface $serviceLocator | |
* @param $name |
This file contains 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
local workApplications = { 'Mail','HipChat','PhpStorm','Safari','Charles'} | |
local workApplicationWatcher; | |
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "H", function() | |
hs.notify.new({title="Hammerspoon", informativeText="Setting home layout"}):send() | |
local homeMonitor = "LG ULTRAWIDE" | |
local windowLayout = { | |
{"PhpStorm", nil, homeMonitor, {x=0, y=0, w=0.6, h=1}, nil, nil}, | |
{"Charles", nil, homeMonitor, {x=0.6, y=0.6, w=0.4, h=0.4}, nil, nil}, |
This file contains 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
Homebrew build logs for josegonzalez/php/php70 on macOS 10.11.6 | |
Build date: 2016-09-26 21:45:45 |
This file contains 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 | |
/* | |
* Typical database config | |
*/ | |
// .... | |
'doctrine' => [ |