Skip to content

Instantly share code, notes, and snippets.

View aufa's full-sized avatar

NAWA aufa

View GitHub Profile
@aufa
aufa / contoh.php
Last active September 13, 2016 19:51
<?php
$database = \MyNameSpace\ExamDB::create(
'mysql',
[
'dbuser' => 'root',
'dbpass' => 'password',
'dbname' => 'test',
'host' => 'localhost'
],
true // debug true throwed if error
@aufa
aufa / App.php
Created September 14, 2016 16:22
Creating Simple BenchMark Collection on Slim 3
<?php
/**
* Example
*/
namespace MyNameSpace;
use Slim\App as Slim;
use Pentagonal\Component\Slim\BenchMark;
/**
@aufa
aufa / Aufa\Gist\Component\DataStorage.php
Created September 18, 2016 16:10
(Data Storage Object) Safely Save & Serve
<?php
namespace Aufa\Gist\Component;
/**
* Class DataStorage
* @package Aufa\Gist\Component
*
* add backslash to use default core function - to avoid user create new functions instead of
*/
class DataStorage implements \ArrayAccess, \Serializable, \Countable, \JsonSerializable