Skip to content

Instantly share code, notes, and snippets.

View anton-kotik's full-sized avatar

Anton Kotik anton-kotik

View GitHub Profile
@anton-kotik
anton-kotik / php-class-template.php
Last active August 22, 2016 00:34
Simple PHP class template
<?php
namespace Application\Component\Example;
use Traversable;
use Exception as PhpException;
use Application\Component\Exception;
use Zend\Stdlib\ArrayUtils;
@anton-kotik
anton-kotik / zf2-sql-examples.php
Last active November 13, 2022 18:54
Zend Framework 2 database SQL examples
<?php
use Zend\Db\Sql\Expression;
use Zend\Db\Sql\Predicate\Operator;
use Zend\Db\Sql\Select;
use Zend\Db\Sql\Where;
use Zend\Db\TableGateway\TableGateway;
$adapter = $this->getServiceLocator()->get('Zend\Db\Adapter\Adapter');
$table = new TableGateway('users', $adapter);