Skip to content
/ init Public

Help execute static initialization of the class, usually for preloading singletons / 帮助执行类的静态初始化,通常用于预加载单例

Notifications You must be signed in to change notification settings

mix-php/init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMix 出品:https://openmix.org

Mix Init

Help execute static initialization of the class, usually for preloading singletons

帮助执行类的静态初始化,通常用于预加载单例

Installation

composer require mix/init

Quick start

定义类的静态初始化方法

class Example
{
    public static function init()
    {
        // do something
    }
}

从目录执行

可以通过定制方法名称,达到在不同的场景初始化的目的

Mix\Init\StaticInit::finder('/path/classdir')->exec('init');

License

Apache License Version 2.0, http://www.apache.org/licenses/

About

Help execute static initialization of the class, usually for preloading singletons / 帮助执行类的静态初始化,通常用于预加载单例

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages