Skip to content

Instantly share code, notes, and snippets.

View d4r5c0d3's full-sized avatar

d4r5c0d3

View GitHub Profile
/**
* Caches the return value of get accessors and methods.
*
* Notes:
* - Will reset the get accessor cache if a new value is set.
* - Doesn't really make sense to put this on a method with parameters
*/
export function Memoize(target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>) {
if (descriptor.value != null) {
memoizeMethod(descriptor);
<?php
namespace ExampleBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use ExampleBundle\Form\EventListener\addTranslatedFieldSubscriber;
# SCREENSHOT EXAMPLE: http://grab.by/bzg3
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################