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 | |
//Methode 1 | |
class Db | |
{ | |
private $_timeOut = 30; | |
private $_cache = null; | |
//... |
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 | |
//Methode 1 | |
class Model | |
{ | |
protected $tableName = ''; | |
//Default inflection im ctor? | |
} |
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 ViewBag | |
{ | |
private $subject; | |
public function __construct($subject) | |
{ |
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 Psr\Http\Message\ResponseInterface; | |
use Ion\Http; | |
use Ion\Http\{ | |
MiddlewareInterface, | |
Middleware\Dispatcher, | |
Middleware\RunFilterTrait, | |
Response | |
}; |
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 | |
declare(strict_types=1); | |
namespace Ion\Http\Middleware; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\ServerRequestInterface; | |
class Queue extends \SplQueue | |
{ |
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 Psr\Http\Message\ResponseInterface; | |
use Ion\Http; | |
use Ion\Http\{ | |
Middleware\Queue, | |
MiddlewareInterface, | |
Middleware\Dispatcher, | |
Middleware\RunFilterTrait, | |
Response |
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 MyCollection | |
{ | |
//Iterator/ArrayAccess/Countable stuff... | |
public overload -(array $other) | |
{ | |
return new self(array_diff($this->items, $other)); |
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 | |
declare(autobox='MyAutoboxer::box'); | |
//All variables coming into this file will be handled through autoboxing | |
class Autoboxer | |
{ | |
public static function box(mixed $value) | |
{ |
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 function __cast($type) { | |
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 Column implements Annotation | |
{ | |
private string $type; | |
private int $length; | |
private bool $nullable; | |
public function __construct(string $type, int $length = null, bool $nullable = false) |