CodeIgniter Coding Standard v1.0.0 released! https://github.com/CodeIgniter/coding-standard/releases/tag/v1.0.0
- Daftarkan code ke Version Control biar bisa di-undo kalau ada false positive, contoh undo dari git:
git checkout .
CodeIgniter Coding Standard v1.0.0 released! https://github.com/CodeIgniter/coding-standard/releases/tag/v1.0.0
git checkout .
<?php namespace App\Commands; | |
use CodeIgniter\CLI\BaseCommand; | |
use CodeIgniter\CLI\CLI; | |
class CreateDb extends BaseCommand | |
{ | |
protected $group = 'app'; | |
protected $name = 'app:createdb'; | |
protected $description = 'Create database'; |
$routes->group('user', [ | |
'filter' => 'permission:manage-user', | |
'namespace' => 'agungsugiarto\boilerplate\Controllers\Users', | |
], | |
function($routes) | |
{ | |
$routes->get('show', 'UserController::show', ['as' => 'user-show']); | |
}, | |
function ($routes) | |
{ |
Assumption:
<?php
include 'vendor/autoload.php';
<?php | |
class DsnReader | |
{ | |
private $dsn; | |
public function __construct($dsn) | |
{ | |
$this->dsn = $dsn; | |
} |
namespace Foo\Middleware;
use Interop\Http\ServerMiddleware\DelegateInterface;
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\JsonResponse;
class JsonWrappingMiddleware implements MiddlewareInterface
{
<?php | |
// src/App/Helper/I18nDelegatorFactory.php | |
namespace App\Helper; | |
use Zend\I18n\View\HelperConfig; | |
use Zend\ServiceManager\Factory\DelegatorFactoryInterface; | |
use Interop\Container\ContainerInterface; | |
class I18nDelegatorFactory implements DelegatorFactoryInterface | |
{ |
<?php | |
/** | |
* This is a quick example of how to stream a file to a client, likely a browser, | |
* using Zend Expressive. There are a lot of factors which it doesn't take in to | |
* account. But for the purposes of a quick intro, this should suffice. | |
*/ | |
class ViewDocumentPageAction | |
{ | |
protected function downloadFile() | |
{ |
# Goes in your .git/config file | |
[alias] | |
# Temporarily stop tracking a file in git. | |
# usage: git unwatch path/to/file | |
unwatch = update-index --assume-unchanged | |
# Resume tracking a file in git. | |
# usage: git watch path/to/file | |
watch = update-index --no-assume-unchanged |