Skip to content

Instantly share code, notes, and snippets.

View jasonhazel's full-sized avatar
💜

Jason Hazel jasonhazel

💜
View GitHub Profile
@jasonhazel
jasonhazel / light_controller.php
Created November 10, 2012 00:43
unprovoked rewrite of schwippy tree script.
<?php
// create the light controller and assign the color codes.
$lights = new LightController(
//-- our color codes
array(
'blue' => 'G5',
'white' => 'G6',
'green' => 'G7',
'red' => 'G8'
)
@jasonhazel
jasonhazel / action.php
Created September 2, 2012 22:39
r/PHPHelp
d
<?php
$template_path = 'pages/public/';
$main_template = 'main.tmpl';
if(isset($_GET['p']))
$file = basename($_GET['p']) . '.tmpl';
else
$file = 'default.tmpl';
function Module($filePath, $attributes)
{
// Usage: Module('templateName.php', array('var1' => 'val1', 'var2' => 'val2', 'foo' => 'bar'))
//-- get Fusebox var in order to set also the circuit that has initiated the Module call
$a_Fusebox =& get_fusebox();
$parentCircuit = $a_Fusebox['circuit'];
$isModule = true;
$myPath = getcwd() . '/';
<?php
class Foo
{
public function Run() {}
}
class Bar
{
public function Run() {}