Skip to content

Instantly share code, notes, and snippets.

View bramstroker's full-sized avatar

Bram Gerritsen bramstroker

View GitHub Profile
use Doctrine\ORM\Mapping as ORM;
trait CampsiteTrait
{
/**
* @ORM\Column(name="campsiteID", type="integer", precision=0, nullable=false)
* @var int $campsiteID
*/
protected $campsiteID = null;
@bramstroker
bramstroker / TaggableMemcached.php
Created February 12, 2013 13:33
TaggableMemcached storage adapter
<?php
/**
* Memcached storage adapter with tag support
*
* @category AcsiBase
* @package AcsiBase\Cache
* @copyright 2012 ACSI Holding bv (http://www.acsi.eu)
* @version SVN: $Id$
*/
<?php
class MyService
{
private $repo;
public function __construct(ObjectRepository $repo)
{
$this->repo = $repo;
}
<?php
/**
* PoiProviderInterface
*
* @category AcsiMap
* @package AcsiMap\Poi
* @copyright 2013 ACSI Holding bv (http://www.acsi.eu)
* @version SVN: $Id$
*/
/**
* This action return content for the balloon popups on the map
*
* @return ViewModel
*/
public function balloonAction()
{
$reference = $this->params()->fromQuery('reference');
$type = $this->params()->fromQuery('type');
<!DOCTYPE html><!--[if IE 8 ]><html lang="nl_NL" class="no-js ie8"><![endif]-->
<!--[if IE 9 ]><html lang="nl_NL" class="no-js ie9"><![endif]-->
<!--[if IE 10 ]><html lang="nl_NL" class="no-js ie10"><![endif]-->
<!--[if (gt IE 10)|!(IE)]><!--><html lang="nl_NL" class="no-js"><!--<![endif]-->
<?php
/**
* CampsiteController
*
* @category AcsiCampsite
* @package AcsiCampsite\Api
* @copyright 2013 ACSI Holding bv (http://www.acsi.eu)
* @version SVN: $Id$
*/
Status Code: 500 Internal Server Error
Cache-Control: max-age=3600, must-revalidate, public
Connection: close
Content-Type: text/html
Host: localhost
X-Powered-By: A lot of coffee, blood, sweat and tears
Cookie: __gads=ID%3D41ab1faa088b6af9%3AT%3D1372863629%3AS%3DALNI_MbqutE_47luKYkng9NDbMuIY5xL0A; XDEBUG_SESSION=PHPSTORM
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: null
Accept-Encoding: gzip, deflate
Content-Type: application/json; charset=UTF-8
Content-Length: 21
Connection: keep-alive
[09:43] <bramstroker> Hi, does composer provide some option to use 'prefer-source' for a particular package and 'prefer-dist' for all other packages?
[09:45] <bramstroker> My question arrises because I want to subclass Zend Framework 2 classes in my own testsuite, but the tests directory is ignored for export (ignore-export in .gitattributes).
[09:46] <bramstroker> prefer-source for all packages is not really an option because I don't need all the VCS overhead on my build server and composer install will take like 15 minutes.
[09:55] <ocramius> bramstroker: you shouldn't import classes from the zf2 test suite, they're not reusable code
[09:58] <bramstroker> @ocramius, I've created my own cache storage adapter and ZF2 provides a CommonAdapterTest, so it seems common sense to me to extend from it instead of duplicating the code into my own library.
[09:59] <ocramius> bramstroker: yes, but the test suite is not stable
[10:01] <bramstroker> ocramius: ok. that's a good argument.
[10:01] <bramstroker> So only opti