kohkimakimoto / static-proxy
StaticProxy provides static interface to an instance method.
v0.1.0
2014-08-04 04:34 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- fabpot/php-cs-fixer: @stable
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: dev-master
This package is auto-updated.
Last update: 2024-11-06 23:16:11 UTC
README
StaticProxy provides static interface to an instance method. It's heavily inspired by the Facades of Laravel.
Requirement
PHP5.3 or later.
Installation
You can use composer installation.
Make composer.json
file like the following.
{ "require": { "kohkimakimoto/static-proxy": "0.*" } }
And run composer install command.
$ 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
License
MIT