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
return array( | |
'service_manager' => array( | |
// implicit invokable | |
'Application\Route\Resource' => 'Application\Route\Resource' | |
'Application\Route\Resource' => 'Application\Route\ResourceFactory', | |
// EXACTLY THE SAME AS ABOVE BUT MORE VERBOSE: | |
'Application\Route\Resource' => 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
return array( | |
'router' => array( | |
'routes' => array( | |
'users' => array( | |
'type' => 'ResourceGraphRoute', | |
'options' => array( | |
'route' => '/users', | |
'resource' => 'Application\Entity\User' | |
) | |
), |
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
'router' => array( | |
'routes' => array( | |
'users' => array( | |
'type' => 'ResourceGraphRoute', | |
'options' => array( | |
'route' => '/users', | |
'resource' => 'Application\Entity\User' | |
) | |
), | |
), |
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
{{#view App.SingleFolderView}} | |
<tr {{bindAttr class=":folder isSelected:active"}}> | |
<td>{{name}}</td> | |
<td>dossier</td> | |
<td>25 septembre 2012</td> | |
<td>4,2 Mo</td> | |
</tr> | |
{{/view}} | |
App.SingleFolderView = Ember.View.extend({ |
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
App.Folder = DS.Model.extend({ | |
name: DS.attr('string'), | |
parentFolder: DS.belongsTo('App.Folder'), | |
childrenFolders: DS.hasMany('App.Folder'), | |
files: DS.hasMany('App.File'), | |
elements: function() { | |
// Concatenate files and childrneFolders | |
return result; |
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 PrivateMessaging\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use User\Entity\AbstractUser; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="UsersThreads", uniqueConstraints={ |
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 | |
// In the PostRepository | |
public function getBySlugCategory($slugCategory) | |
{ | |
$dql = 'SELECT p FROM Application\Entity\Post p ' . | |
'JOIN Application\Entity\PostCategory pc WITH pc.category MEMBER OF p.categories ' . | |
'JOIN pc.category c ' | |
'WHERE c.slug = :slug'; |
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 | |
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
INTRODUCTION | |
A. Historique de Zend Framework 2 | |
B. Composer, Packagist et la gestion des dépendances en PHP | |
C. Installation d'une application (ZendSkeletonApplication) | |
D. Installation d'outils utiles (ZFTool, ZendDevelopperTools) | |
CONCEPTS DE BASE | |
A. Autoloading (Composer + manuel) |