Skip to content

Instantly share code, notes, and snippets.

View clayhinson's full-sized avatar

Clay Hinson clayhinson

  • Cleveland, OH
View GitHub Profile
@clayhinson
clayhinson / update_frapi_core.sh
Created March 17, 2011 18:37
updates frapi core while preserving a symlink to a self-managed custom/ folder
#!/bin/bash
#assumes working copy is a fork & upstream is set to git@github.com:frapi/frapi.git
# temporarily move custom symlink
mv src/frapi/custom src/frapi/custom_symlink &&
# reset any changes (i.e. deletion of custom folder)
git reset --hard &&
@clayhinson
clayhinson / Action_AliasRouteForOtherAction.php
Created March 9, 2011 21:01
Aliased Actions in Frapi, to provide multiple URL routes to the same code.
<?php
require_once 'OtherAction.php'
class Action_AliasRouteForOtherAction extends Frapi_Action implements Frapi_Action_Interface
{
protected $requiredParams = array();
protected $data = array();
public function toArray() {}
<?php
class Coordinate
{
protected $x;
protected $y;
public function __construct($x = null, $y = null)
{
(empty($x)) ?: $this->setX($x);