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\{ | |
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 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 | |
//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 | |
return [ | |
'db' => [ | |
'host' => 'localhost', | |
'user' => '<db_user>', | |
'password' => '<db_password>', | |
'name' => '<database_name>' | |
] | |
]; |
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 | |
/** | |
* Tale\StringUtil - The Tale Framework | |
* | |
* @version 1.0 | |
* @status Beta | |
* @author Torben Köhn <t.koehn@outlook.com> | |
* | |
* This software is distributed under the MIT license. | |
* A copy of the license has been distributed with this software. |
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
namespace OwnScript.MyNamespace | |
use OwnScript.SomeOtherNamespace //kein * nötig, da OwnScript keine Klasse, sondern ein Namespace ist | |
use Vendor.Some.Other.Stuff | |
class MyClass > DerivedClass: | |
public myProperty: | |
get: |
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 | |
//Simple Captcha Function | |
//Creates funny and not that easily readable captchas | |
// ================ | |
// (c) 2009 by DarkDevine | |
// Modificate as you want, just keep some credits | |
// Fonts from http://urbanfonts.com , you can get new ones there as well | |
// ================ | |
// Usage: generate_captcha( $mode ) for generating the captcha, | |
// check_captcha( $string) for checking with user input |
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
app.bind = function( entryPoint, middleware, module ) { | |
if( !module ) { | |
module = middleware; | |
middleware = null; | |
} | |
var methods = { get: 'get', post: 'post', put: 'put', delete: 'del' }; | |
for( var i in module ) { |