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 fetchAll() | |
{ | |
$sqlSelect = $this->tableGateway->select(function (Select $select) { | |
$select->where(array( | |
"name_de" => "Default" | |
)); | |
$select->order('name_de DESC'); | |
}); | |
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 Manuel Stosic <[email protected]> | |
*/ | |
namespace Zf2demo\Hydrator; | |
use Zend\Stdlib\Hydrator\ClassMethods; | |
/** |
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
'filters' => [ 'invokables' => [ 'fooFilter' => 'My\Namespace\FooFilter']] | |
class FooFilter implements FilterInterface | |
{ | |
public function filter($str) { | |
$str = magic_happens($str); | |
return $str; | |
} | |
} |
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 | |
class HelperFactory implements FactoryInterface | |
{ | |
public function createService(ServiceLocatorInterface $sl) | |
{ | |
$realSL = $sl->getServiceLocator(); | |
$repository = $realSL->get('Doctrine\ORM\EntityManager')->getRepository('My\Repository'); | |
return new MyHelper($repository); |
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
'view_helper_config' => [ | |
'flashmessenger' => [ | |
'message_open_format' => '<div%s><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><ul><li>', | |
'message_close_string' => '</li></ul></div>', | |
'message_separator_string' => '</li><li>' | |
] | |
], |
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
'zfc_rbac' => [ | |
'identity_provider' => UserService::class | |
], | |
'controllers' => [ | |
'factories' => [ | |
LoginController::class => LoginControllerFactory::class, | |
LogoutController::class => LogoutControllerFactory::class, | |
DetailController::class => DetailControllerFactory::class | |
] | |
], |
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
'router' => [ | |
'routes' => [ | |
'sam-rfc' => [ | |
'type' => 'Zend\Mvc\Router\Http\Literal', | |
'options' => [ | |
'route' => '/sam-rfc', | |
'defaults' => [ | |
'controller' => 'SamRfc\Controller\IndexController', | |
'action' => 'index' | |
] |
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
$this->blocks('startbody') | |
ViewHelper::__invoke($part = 'startbody') | |
ViewHelper->getBlockService()->findBlock($part) | |
BlockService->findBlock($part) | |
BlockService->getBlockRepository->findBy('part', $part) |
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
#!/bin/bash | |
# Try and get debian operating system | |
# id, codename, and release | |
TYPE=$(echo "$1" | tr '[A-Z]' '[a-z]') | |
OS=$(uname) | |
ID="unknown" | |
CODENAME="unknown" | |
RELEASE="unknown" |
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
class EntitiesFromToday extends Criteria | |
{ | |
public function __construct(Expression $expression = null, array $orderings = null, $firstResult = null, $maxResults = null) | |
{ | |
parent::__construct($expression, $orderings, $firstResult, $maxResults); | |
$this->andWhere( | |
$this->expr()->qt( | |
'published', | |
new \DateTime('-1 day') |