StaticProxy
, (*1)
StaticProxy provides static interface to an instance method.
It's heavily inspired by the Facades of Laravel., (*2)
Requirement
PHP5.3 or later., (*3)
Installation
You can use composer installation.
Make composer.json file like the following., (*4)
{
"require": {
"kohkimakimoto/static-proxy": "0.*"
}
}
And run composer install command., (*5)
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install
Usage
<?php
use Kohkimakimoto\StaticProxy\StaticProxy;
use Kohkimakimoto\StaticProxy\StaticProxyContainer;
$container = new StaticProxyContainer();
$container->bind("hello", new HelloworldFunctions());
StaticProxy::setContainer($container);
StaticProxy::addAlias("Hw", "Test\Kohkimakimoto\StaticProxy\Helloworld");
Hw::helloWorld();
Author
Kohki Makimoto kohki.makimoto@gmail.com, (*6)
License
MIT, (*7)