Skip to content

Instantly share code, notes, and snippets.

View mmoreram's full-sized avatar
🤑
Working on Apisearch

Marc Morera mmoreram

🤑
Working on Apisearch
View GitHub Profile
@mmoreram
mmoreram / configure-payfony-environment.md
Last active December 24, 2015 08:39
How to configure your Symfony2 project to work with Payfony platforms
@mmoreram
mmoreram / install-platform.md
Last active December 24, 2015 08:39
Install any PayFony payment platform into your Symfony2 projects.

Installing PayFony

You have to add require line into you composer.json file

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    ...

"username/platform-bundle": "version"

@mmoreram
mmoreram / create-platform.md
Last active December 23, 2015 16:29
Create new PayFony payment platform.
@mmoreram
mmoreram / doctrineTreeBuilder
Last active December 21, 2015 10:29
Doctrine2 Entity tree builder O(n)
<?php
/**
* Cost O(n)
*
* This method allow build a tree given following data
*
* $entities is an Array ( or any ArrayIterator implementation ) of $entity
* $entity is an Object ( can be Whatever )
*
<?php
/**
* Custom ArrayCollection for Doctrine2 entities
*/
namespace XXX\XXX\Collections;
/**
* Custom array collection