ahir/facades

Facade 模式库。

此包的官方仓库似乎已消失,因此该包已被冻结。

维护者

详细信息

github.com/ahirarge/facades

1.0.1 2014-12-03 14:01 UTC

This package is not auto-updated.

Last update: 2024-01-15 23:44:30 UTC


README

Facade 是一个用于 facade 模式的库。您可以像使用 Laravel Facades 一样使用自己的 facade。

安装

通过 composer 安装,只需在您的 composer.json 文件中添加以下内容

{
    "require": {
        "ahir/facades": "1.*",
    }
}

使用

use Ahir\Facades\Facade;

class Alert extends Facade {

    /**
     * Get the connector name of main class
     *
     * @return string
     */
    public static function getFacadeAccessor() 
    { 
        return 'Acme\Libraries\Alert';
    }

}
Alert::sample();

许可

MIT