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
assume, i have a method in AlbumTable class like the following : | |
<?php | |
///////// | |
public function fetchAll() | |
{ | |
$sqlSelect = $this->tableGateway->getSql() | |
->select()->columns(array('artist', 'title', 'id')) | |
->join('track', 'track.album_id = album.id', array(), 'left'); | |
return $this->tableGateway->select($sqlSelect); |
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 My\Modules\Authentication\Form; | |
use Zend\Form\Form; | |
use Zend\InputFilter\InputFilterProviderInterface; | |
class ChangePassword extends Form implements InputFilterProviderInterface | |
{ | |
public function __construct() |
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 MyFunnyValentine; | |
// Detect if the currently matched route belongs to this module. | |
// The assumption is that the controller name includes the module namespace. | |
class Module | |
{ | |
public function onBootstrap($e) |
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\Select; | |
// basic table | |
$select0 = new Select; | |
$select0->from('foo'); | |
// 'SELECT "foo".* FROM "foo"'; | |
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 | |
copy(__DIR__ . '/music.db.original', __DIR__ . '/music.db'); | |
include 'vendor/autoload.php'; | |
return new Zend\Db\Adapter\Adapter(array( | |
// Sqlite Configuration | |
'driver' => 'Pdo', | |
'dsn' => 'sqlite:' . __DIR__ . '/music.db', |
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 | |
/** | |
* @author Marco Pivetta <ocramius@gmail.com> | |
*/ | |
use Zend\ServiceManager\ServiceManager; | |
use Zend\Mvc\Service\ServiceManagerConfig; | |
use DoctrineORMModuleTest\Framework\TestCase; | |
use ContentTest\Util\ServiceManagerFactory; | |
use Zend\Loader\StandardAutoloader; |
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 | |
/** | |
* @author Manuel Stosic <manuel.stosic@krankikom.de> | |
*/ | |
namespace Zf2demo\Hydrator; | |
use Zend\Stdlib\Hydrator\ClassMethods; | |
/** |
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 the Abstract query, which has nearly all needed Methods as the Query. | |
$this->queryMock = $this->getMockBuilder('\Doctrine\ORM\AbstractQuery') | |
->setMethods(array('setParameter', 'getResult')) | |
->disableOriginalConstructor() | |
->getMockForAbstractClass(); |
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 Mocks; | |
use Doctrine\DBAL\Driver\Statement; | |
/** | |
* Doctrine DBAL Statement implementing \Iterator. | |
* | |
* This class has been created because of a bug in PHPUnit Mock Objects. |
OlderNewer