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 / available-platforms.md
Last active December 24, 2015 14:29
Available Payfony platforms
@mmoreram
mmoreram / contribute-payfony.md
Last active December 24, 2015 14:29
Contributing in Payfony project

Contribute

All code is Symfony2 Code formatted, so every pull request must be validated with phpcs standards which you can install following these steps.

There is also a policy for contributing to this project. All pull request must be all explained step by step, to make for contributors more understandable and easier to merge the pull request. All new features must be tested with PHPUnit.

When contributing with Payfony, you can contact yuhu@mmoreram.com to let us know about your contribution in this amazing project.

Contributors

@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