indragunawan/facade-bundle 问题修复 & 功能扩展

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

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

indragunawan/facade-bundle

Composer 安装命令:

composer require indragunawan/facade-bundle

包简介

Support Facades for Symfony services.

README 文档

README

license Travis Scrutinizer Coverage Scrutinizer Source Packagist

Support Facades for Symfony service.

thanks to:

  • Service Locator - for making all the referenced facade service lazy-loaded.
  • Service Autoconfiguration - for making all classes that extend Indragunawan\FacadeBundle\AbstractFacade class automatically tagged as facade.

Documentation

Installation

If your project already uses Symfony Flex, execute this command to download, register and configure the bundle automatically:

composer require indragunawan/facade-bundle

If you install without using Symfony Flex, first add the bundle by using composer then enable the bundle by adding new Indragunawan\FacadeBundle\IndragunawanFacadeBundle() to the list of registered bundles in the app/AppKernel.php file of your project

Creating Facade

To create a facade create a class that extends base Indragunawan\FacadeBundle\AbstractFacade class and implement the getFacadeAccessor method that returns the service id, support private and public service.

<?php

namespace App\Facades;

use Indragunawan\FacadeBundle\AbstractFacade;

class Foo extends AbstractFacade
{
    protected static function getFacadeAccessor()
    {
        return 'App\Service\Foo'; // service id - supports private and public service.
    }
}

Now the facade now ready. Simply import the facade namespace. When you call any static method on the Foo facade, then it will resolve the service that you define in getFacadeAccessor method and call the requested method from the service.

License

This bundle is under the MIT license. See the complete license

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固