Skip to content

Instantly share code, notes, and snippets.

View bakura10's full-sized avatar

Michaël Gallego bakura10

View GitHub Profile
{
"minimum-stability": "dev",
"require": {
"php": ">=5.5",
"zendframework/zendframework": "2.2.*",
"doctrine/migrations": "~1.0@dev",
"doctrine/orm": "2.5.x-dev",
"doctrine/doctrine-orm-module": "0.9.x-dev",
"slm/mail": "~1.3",
"slm/queue-sqs": "0.3.x-dev",
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
<?php
require __DIR__ . '/vendor/autoload.php';
use \Zend\EventManager\ListenerAggregateInterface;
use \Zend\EventManager\EventManagerInterface;
class Listener implements ListenerAggregateInterface
{
protected $bigService;
// We have traversed the whole path, return the last matched path!
if (empty($subPath)) {
if ($previousMatch === null) {
$data = $resource->getData();
$data = $data->matching(new Criteria());
return new SubPathMatch(new Resource($data, $resource->getMetadata()), $subPath);
}
return $previousMatch;
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
module.exports = App.ApplicationRoute = Ember.Route.extend(Ember.SimpleAuth.ApplicationRouteMixin, {
/**
* Setup the application controller
*
* @param controller
*/
setupController: function(controller) {
var projects = this.get('session.user.projects');
if (projects.get('length') > 0) {
module.exports = App.ResourcesRoute = Ember.Route.extend(Ember.SimpleAuth.AuthenticatedRouteMixin, {
renderTemplate: function() {
this.render('sidebar', {into: 'project', outlet: 'sidebar', controller: 'application'});
}
});
@bakura10
bakura10 / EmberRenderer.php
Created March 1, 2014 21:06
This is a renderer for Ember-Data for ZfrRest
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
s3_id: fff
s3_secret: fff
s3_bucket: fff
# Below are examples of all the available configurations.
# See README for more detailed info on each of them.
max_age:
"fonts/*": 31536000
"javascripts/*": 31536000
'use strict';
/**
* Basic form
*/
module.exports = App.ValidatableFormComponent = Ember.Component.extend({
/**
* @type {String}
*/
tagName: 'form',