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
for f in *.sql; do mysql -u root databasename < $f; done; |
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
use Zend\Db\Sql; | |
$sql = new Sql\Sql; | |
$select = $sql->select($table); | |
$select->offset(10); | |
echo $sql->getSqlStringForSqlObject($select); |
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
tar czf changed-files.tar.gz `git diff --name-only HEAD` |
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 | |
use Zend\Db\Sql\Sql; | |
$sql = new Sql($adapter); | |
$oSelect = $sql->select('table_test'); | |
$oSelect->columns(array('*'))->where(array('test' => 'ok')->limit(1); | |
$sqlString = $sql->getSqlStringForSqlObject($oSelect); | |
//see https://github.com/zendframework/zf2/issues/3224 |
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 | |
use Zend\Console\Console; | |
/** | |
* This makes our life easier when dealing with paths. Everything is relative | |
* to the application root now. | |
*/ | |
chdir(dirname(__DIR__)); |
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
$array = array(); | |
foreach($entities as $entity) { | |
$array[] = array( | |
'id' => $entity->getId(), | |
'municipio' => $entity->getMunicipio(), | |
); | |
} | |
return $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 | |
namespace Application; | |
use Zend\Mvc\MvcEvent; | |
use Zend\Validator\AbstractValidator; | |
class Module | |
{ | |
public function onBootstrap(MvcEvent $event) |
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 Common\Service; | |
use Doctrine\ORM\EntityManager; | |
use DoctrineModule\Service\AbstractFactory; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class EntityManagerFactory extends AbstractFactory | |
{ |
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
{ | |
"name": "zendframework/skeleton-application", | |
"description": "Skeleton Application for ZF2", | |
"license": "BSD-3-Clause", | |
"keywords": [ | |
"framework", | |
"zf2" | |
], | |
"homepage": "http://framework.zend.com/", | |
"require": { |
OlderNewer