This file contains hidden or 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 Event | |
{ | |
public $priority; | |
public $call; | |
public $name; | |
This file contains hidden or 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 ViewModel | |
{ | |
public $title; | |
public $lang; | |
public $translations = []; | |
This file contains hidden or 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 | |
function html($name, $attr = [], $value) | |
{ | |
$s = "<{$name} "; | |
if (!empty($attr)) { | |
foreach ($attr as $key => $val) { | |
$s .= "{$key}=\"{$val}\" "; | |
} |
This file contains hidden or 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 Routing extends \Aura\Router\RouterContainer | |
{ | |
protected $container; | |
public function __construct($container) | |
{ | |
parent::__construct(); |
This file contains hidden or 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 T | |
{ | |
public static function __callStatic($name, $arguments) | |
{ | |
if (isset($arguments[0])) { | |
if ($name == 'int') { | |
return (int) $arguments[0]; | |
} elseif ($name == 'string') { |
This file contains hidden or 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 | |
require './container.php'; | |
require './event-handler.php'; | |
$app = new Application(); | |
$router = new Router($app); | |
$app->eventHandler->dispatch(Events::START); |
This file contains hidden or 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 ManyFunctions | |
{ | |
/** | |
* @param string $sMethod | |
* @param array $aParams | |
* @return mixed|void | |
*/ | |
public function __call($sMethod, $aParams = []) |
This file contains hidden or 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 Period extends \DatePeriod | |
{ | |
public function crosses(\DatePeriod $period) | |
{ | |
return $this->numbers_cross( | |
strtotime($this->getStartDate()->format('Y-m-d')), | |
strtotime($this->getEndDate()->format('Y-m-d')), | |
strtotime($period->getStartDate()->format('Y-m-d')), |
This file contains hidden or 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 ReflectionCache | |
{ | |
protected $instance; | |
protected static $instances = []; | |
public function __construct($className) | |
{ |
This file contains hidden or 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 Str | |
{ | |
private $str; | |
public function __construct(string $str) | |
{ | |
$this->str = $str; | |
} |