Skip to content

Instantly share code, notes, and snippets.

@tswicegood
Forked from guilhermeblanco/gist:570856
Created September 8, 2010 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tswicegood/570858 to your computer and use it in GitHub Desktop.
Save tswicegood/570858 to your computer and use it in GitHub Desktop.
<?php
// current implementation
class HairColor implements ReflectionAnnotation {
public $hairColor = "";
}
[HairColor(hairColor="purple")]
class PurplePeopleEater { }
// Travis' thoughts:
class HairColor implements \SPL\Annotation {
public $hairColor = '';
public function __construct($hairColor) {
$this->hairColor = $hairColor;
}
}
[HairColor("purple")]
class PurplePeopleEater() { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment