Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/Aura/Marshal/Entity/GenericEntity.php b/src/Aura/Marshal/Entity/GenericEntity.php
index 8e643eb..cc2d82d 100644
--- a/src/Aura/Marshal/Entity/GenericEntity.php
+++ b/src/Aura/Marshal/Entity/GenericEntity.php
@@ -22,4 +22,29 @@ use Aura\Marshal\Data;
class GenericEntity extends Data
{
use MagicArrayAccessTrait;
+
+ /**
==================================================
Install Silex 1.1.2 and remove tests
==================================================
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/routing (v2.4.0)
@pmjones
pmjones / gist:8074310
Last active January 1, 2016 01:39
removed trait and interface from class count
SILEX="silex-1.1.2"
AURA="Aura.Web_Project"
rm -rf $SILEX
rm -rf $AURA
echo ""
echo "=================================================="
echo "Install Silex 1.1.2 and remove tests"
echo "=================================================="
==================================================
Install Silex 1.1.2 and remove tests
==================================================
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/routing (v2.4.0)
<?php
namespace foo\bar;
use Aura\Marshal\Entity\MagicPropertyTrait;
class PropertyEntityExample impelements ArrayAccess
{
use MagicPropertyTrait;
protected $baz;
<?php
namespace foo\bar;
use Aura\Marshal\Entity\MagicArrayAccessTrait;
use ArrayAccess;
class ArrayAccessEntityExample impelements ArrayAccess
{
use MagicArrayAccessTrait;
Some (but not all) rules for submitting Aura code:
- PSR-1 and 2
- !-operator is followed by space: `! isset()` vs `!isset()`
- under_scores for vars and props, not camelCase
- 100% test coverage of your added code
- No `new` keyword except in factories/builders
- Although `new` is ok with core PHP classes, and exceptions
- Use existing vocabulary: fetch, set, get, load, prep, init, etc
- Use __invoke() for "main" object method
@pmjones
pmjones / gist:7129733
Last active December 26, 2015 09:29
Simplified rewrite of PSR-4, with a nod to Beau Simensen.

Autoloading Standard

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory

  • The term "class" refers to classes, interfaces, traits, and other similar structures.
@pmjones
pmjones / gist:5880322
Created June 27, 2013 20:54
transform rules comparison
Simensen Rules
--------------
1 MUST immediately return the _file system path base_ if the _source_ is equal
to the _logical path base_.
2 MUST return `false` if the _logical path base_ is not valid.
3 MUST append a directory to the _file system path base_, and
@pmjones
pmjones / gist:5877934
Last active December 19, 2015 01:39
Brain dead variation.

PSR-T: Transformation Of Logical Paths To File System Paths

This document describes an algorithm to transform a logical resource path to a file system path. Among other things, the algorithm allows transformation of class paths and other logical resource paths to file paths.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.