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 Entity | |
{ | |
protected $touched = false; | |
public function __construct($aData) | |
{ | |
foreach($aData as $key => $val) { | |
$this->{$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 QueueList | |
{ | |
public function __construct() | |
{ | |
$this->data = []; | |
} | |
public function isEmpty() |
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 | |
$s = ' | |
/** | |
* Send request | |
* | |
* @throws \Exception | |
* @param string $sEvent | |
* @param \com\realexpayments\remote\sdk\domain\iRequest $oRequest | |
* @param boolean $bReturnResponse |
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 | |
$namespace = "App"; | |
$classname = "Kernel"; | |
$extends = "\\Symfony\\Kernel"; | |
$implements = [ | |
"\\App\\Contract\\KernelContract" | |
]; | |
$properties = [ | |
[ |
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 | |
$router->add('GET', '/user/:userId', /* All callable */, $middleware1, $middleware2, $controller); | |
try { | |
$router->execute($request); | |
} catch (\HttpError\Code500 $e) { | |
$e->viewMessage(); | |
} catch (\HttpError\Code403 $e) { | |
$e->viewMessage(); |
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 __DIR__ . '/vendor/autoload.php'; | |
use \App\Foo; | |
use \App\Bar; | |
use \League\Container\Container; | |
class CachedReflection | |
{ |
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 __DIR__ . '/vendor/autoload.php'; | |
use \App\Foo; | |
use \App\Bar; | |
use \League\Container\Container; | |
class CachedReflection | |
{ |
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 | |
$router = new Router(); | |
$router->addService('twig', $twig); | |
$router->addService('logger', function ($msg) { | |
echo $msg; | |
}); | |
$router->addRoute('GET', '/users', [Controller::class, 'getUsers']); |
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 UnsupportedDelimiter extends \Exception | |
{ | |
} | |
class Csv | |
{ | |
public function __construct(string $csv) | |
{ |
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 | |
abstract class Enum | |
{ | |
/** | |
* @var array | |
*/ | |
private static $constCacheArray = null; | |
/** |