Skip to content

Instantly share code, notes, and snippets.

View ThaDafinser's full-sized avatar

Martin Keckeis ThaDafinser

View GitHub Profile
@ThaDafinser
ThaDafinser / gist:4267544
Created December 12, 2012 13:00
Zend Framework 2, Module Module.php ZF2,
<?php
namespace SomeModule;
// Load the appropiate interfaces. You can use every one inside of Zend\ModuleManager\Feature\...Interface
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConsoleBannerProviderInterface;
// we would have to use here all (but that's to long!)
class Module implements AutoloaderProviderInterface, ConsoleBannerProviderInterface
{
@ThaDafinser
ThaDafinser / gist:4952542
Created February 14, 2013 12:48
Zend\Db\Adapter\Adapter
<?php
namespace LispBase\Db\Adapter;
use Zend\Db\Adapter\Adapter as ZendAdapter;
use Zend\Db\Sql\Select;
class Adapter extends ZendAdapter
{
private function getSqlString ($sql)
<?php
namespace LispLogbook\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Table(name="pstEntry")
* @ORM\Entity
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace LispBase\Form\View\Helper;
#!/usr/bin/env php
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
<?php
namespace MyNamespace\View\Strategy;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\View\ViewEvent;
class MyStrategy implements ListenerAggregateInterface, ServiceLocatorAwareInterface
<?php
namespace ZfcDatagrid\DataSource;
use ZfcDatagrid\Filter;
use ZfcDatagrid\DataSource\Doctrine2\Paginator as PaginatorAdapter;
use ZfcDatagrid\Column;
use Doctrine\ORM;
use Doctrine\ORM\Query\Expr;
class Doctrine2 extends AbstractDataSource
@ThaDafinser
ThaDafinser / AbstractServiceManagerAware.php
Last active December 26, 2015 07:49
Proposal for ZF2
<?php
namespace Zend\ServiceManager;
class AbstractServiceManagerAware implements ServiceLocatorAwareInterface
{
/**
*
* @var ServiceLocatorInterface
*/
<?php
namespace ZfcDatagrid\Column;
use ZfcDatagrid\Filter;
use ZfcDatagrid\Column\Formatter\AbstractFormatter;
abstract class AbstractColumn
{
protected $label;
<?php
namespace ZfcDatagrid\Renderer;
use ZfcDatagrid\Datagrid;
use Zend\Paginator\Paginator;
use Zend\View\Model\ViewModel;
use Zend\Mvc\MvcEvent;
use Zend\I18n\Translator\Translator;
use Zend\Http\PhpEnvironment\Request as HttpRequest;
use Zend\Console\Request as ConsoleRequest;