hassankhan/frontman 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hassankhan/frontman

最新稳定版本:v0.2.1

Composer 安装命令:

composer require hassankhan/frontman

包简介

A simple package to create your own Laravel-style facades

README 文档

README

Latest version Software License Build Status Coverage Status Quality Score Total Downloads

Frontman is a simple class that you can extend to create your own Laravel-style facades (or proxies, as they should be called).

Install

Via Composer

$ composer require hassankhan/frontman

Usage


use Frontman\Proxy;
use Frontman\ProxyInterface;

class MyClass
{
    public function foo()
    {
        echo 'Foo';
    }
}

class MyOtherClass
{
    protected $value;

    public function __construct($value)
    {
        $this->value = $value;
    }

    public function bar()
    {
        echo 'Bar';
    }
}

class MyProxy extends Proxy implements ProxyInterface
{
    public static function getRealClass()
    {
        return 'MyClass';
    }
}

class MyOtherProxy extends Proxy implements ProxyInterface
{
    public static function getRealClass()
    {
        return 'MyOtherClass';
    }

    public static function getConstructorArguments()
    {
        return array('5');
    }
}

MyProxy::foo();         // 'Foo'
MyOtherProxy::bar();    // 'Bar'

Contributing

Please see CONTRIBUTING.md for details.

Credits

License

The MIT License (MIT). Please see LICENSE.md for more information.

统计信息

  • 总下载量: 4.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-04