This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use php_user_filter as StreamFilter; | |
use Composer\Autoload\ClassLoader; | |
require __DIR__ . '/vendor/autoload.php'; | |
class MyFilter extends StreamFilter | |
{ | |
const FILTER_ID = 'my_filter'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vago\Driver; | |
/** | |
* Connection interface. | |
*/ | |
interface Connection | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Wallet { | |
protected $balance; | |
public function __construct($initial=0.0) { | |
$this->balance = $initial; | |
} | |
public function add($money) { | |
$this->balance += $money; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Froebel; | |
use Froebel\Hash\Hash; | |
use Froebel\Storage\Storage; | |
class Engine | |
{ | |
protected $hashes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Froebel\Import; | |
use Froebel\Engine; | |
use Froebel\Import\Reader\Reader; | |
class Workflow | |
{ | |
public $engine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Singleton // https://github.com/Trismegiste/Php-Is-Magic | |
{ | |
public static function getInstance() | |
{ | |
static $instances = array(); | |
$key = get_called_class(); | |
if (!array_key_exists($key, $instances)) { | |
$instances[$key] = new $key(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Request | |
{ | |
public $controller; | |
public $vars; | |
public function __construct(array $vars = array()) | |
{ | |
$this->vars = $vars; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
abstract class Lazy implements \ArrayAccess { | |
private $input; | |
private $cache = array(); | |
public function __construct($input) { | |
static $inputs = array( | |
INPUT_POST, INPUT_GET, INPUT_COOKIE, | |
INPUT_ENV, INPUT_SERVER, INPUT_SESSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Aix\HTTP; | |
interface Request | |
{ | |
const METHOD_GET = 'GET'; | |
const METHOD_HEAD = 'HEAD'; | |
const METHOD_POST = 'POST'; | |
const METHOD_PUT = 'PUT'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Ex\HTTP; | |
use Aix\HTTP\Request as BaseRequest; | |
class Request implements BaseRequest | |
{ | |
private $method; |
OlderNewer