定制 openlss/core-boot 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

openlss/core-boot

Composer 安装命令:

composer require openlss/core-boot

包简介

The OpenLSS bootstrapper

README 文档

README

The OpenLSS boostrapper

Usage

require('boot.php');
__boot();

Optionally you can predefine root path and a group root

define('ROOT',__DIR__);
define('ROOT_GROUP',__DIR__.'/admin');
require('boot.php');
__boot();

What it does

  • By just loading the file
  • Sets all PHP errors to be exceptions
  • Sets up a default exception handler to print friendlier error messages than PHP does by default for uncaught exceptions
  • Sets the default timezone to UTC
  • Sets the ROOT constant if not already defined
  • By calling the __boot() function
  • Calls __boot_pre()
  • Calls __boot_post()
  • By calling __boot_pre()
  • Loads all the dynamic config files and user overrides
  • Sets the timezone from the config
  • By calling __boot_post()
  • Dynamically loads all module init code
  • Loads the Composer autoload file (which will init composer modules and enable autoloading)

Reference

The bootstrapper gives several low level functions to be used for loading the LSS environment

(void) __boot()

Boots up the environment

(void) __boot_pre()

See above for details

(void) __boot_post()

See above for details

(bool) __init_load_files($dir_path,$callback=false,$callback_params=array(),$recurse=true)

Loads all PHP files from a given directory either by just including them or passing them to a callback

  • $dir_path The path to load files from
  • $callback A function to be called with the path to each file for custom loading
  • $callback_params An array of parameters to be passed to the callback in addition to the location of the file
  • $recurse When set to TRUE will recurse into lower directories and load all files

(void) __e($err=array())

Loads error codes

  • Array should be in the following format
  • CODE => 'CONSTANT' * EG: 1001 => 'E_USER_INVALID' NOTE: Will throw a PHP E_NOTICE if there is a code or constant conflict

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2013-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固