Skip to content

Instantly share code, notes, and snippets.

Avatar

Geoffrey Hoffman phpguru

View GitHub Profile
View Environment.php
<?php
class Environment {
/**
* Current environment
*
* @var string
*/
static protected $env;
View Autoload.php
<?php
/**
* TODO: Add support for namespaces... If we ever move to PHP 5.3+
*/
class Autoload {
/**
* Class directories
*
View Input.php
<?php
class Input {
/**
* Protocol (http or https)
*
* @return string
*/
static public function protocol() {
View Curl.php
<?php
class Curl {
/**
* cURL request method
*
* @var string
*/
protected $_method = 'GET';
View Crypt.php
<?php
class Crypt {
/**
* The encryption cipher
*
* @var string
*/
static public $cipher = MCRYPT_RIJNDAEL_256;
View Date.php
<?php
/**
* Date class
*/
class Date {
/**
* Fuzzy date strings
*
* @var array
View gist:4670029
☹☺☻☃☠
⚠⚡✆♿
✈☎☏☂☔✉☄☽☾☕✇❤
☯✝✞✟☨☦☭☮☪☫☬☩✠☧✡
♈♉♊♋♌♍♎♏♐♑♒♓
♀♂☿♁⚢⚣⚤⚥⚦⚧⚨⚩
❁❀✿✽✾❃⚘☘
♚♔♛♕♜♖♝♗♞♘♟♙
♥♡♠♤♦♢♣♧
✩★☆✪✫✬✭✮✯✰☼☸☉❂
View static-non-static-mixing.php
<?php
class Foo {
public static function bar() {
echo "calling public static bar() in an ".(isset($this)?"object (".get_class($this).")":"static")." context. \n";
}
public function baum() {
echo "calling public baum in an ".(isset($this)?"object (".get_class($this).")":"static")." context. \n";
}
}