Skip to content

Instantly share code, notes, and snippets.

View robert-dale-schell's full-sized avatar

Robert Dale Schell robert-dale-schell

View GitHub Profile
<?php
class DomainObject
{
public function __construct($arr = array())
{
foreach($arr as $key => $value)
$this->$key = $value;
$this->_attributes = new Attributes();
<?php
$english = arr(
strr('Hello X'),
strr('Goodbye X')
);
$pirate = $english
->replace('/Hello/', 'Avast')
->replace('/Goodbye/', 'Was good te see ye')
@anthonyshort
anthonyshort / formalize.css
Created August 9, 2010 02:01
Simple form reset
/*
Form Elements
-- Styled to look like native Safari on OS X.
-- Drop-down <select> menus are unaffected.
-- Buttons are unaffected. Native OS style.
*/
::-webkit-input-placeholder {
color: #000;
}
<?php
// Define the 'class' class
$class = Obj()
->fn('new', function ($class) {
$newClass = Obj($class->methods)
->fn('new', function($class) {
$obj = Obj($class->imethods);
$args = func_get_args();
array_shift($args);
<?php
$array = function() {
$elements = func_get_args();
$result = fn(function($i) use ($elements) {
return $elements[$i];
});
$result->len = function() use ($elements) {