Skip to content

Instantly share code, notes, and snippets.

View manuakasam's full-sized avatar

Manuel St. manuakasam

  • Germany, NRW, Duisburg
View GitHub Profile
@manuakasam
manuakasam / gist:3182357
Created July 26, 2012 14:26
Create Doctrine based Form via Factory with Collections and Select Elements Hydratable
<?php
namespace Zebreco\Form;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zebreco\Entity\Ticket;
use DoctrineORMModule\Stdlib\Hydrator\DoctrineEntity as ClassMethods;
class TicketCreateFactory implements FactoryInterface
@manuakasam
manuakasam / gist:3182360
Created July 26, 2012 14:26 — forked from davidwindell/gist:3181965
ZF2 Select Element bound to Object
<?php
namespace My\Form\Element;
use Zend\Form\Element\Select as SelectElement;
class DepartmentSelect extends SelectElement
{
<?php
class Foo
{
protected $labelCallable;
public function setLabelCallable($labelCallable)
{
$this->labelCallable = $labelCallable;
}
### Install OpenJDK
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Download and Install ElasticSearch
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.deb
sudo dpkg -i elasticsearch-1.4.4.deb