定制 f2/common 二次开发

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

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

f2/common

Composer 安装命令:

composer require f2/common

包简介

Provides shared functionality and exception classes for F2 libraries.

README 文档

README

This library is used by other f2/*-libraries for basic things such as configuration discovery, common exception classes and performance optimizations.

F2::events(): F2\Common\Contracts\EventServiceInterface

Provides the central event dispatcher:

Listening for events

F2::events()->on('some_event_name', function(F2\Common\Contracts\EventInterface $event) {});

Un-listening

F2::events()->off('some_event_name', $handler);

Emitting events

F2::events()->emit(new F2\Common\Event('some_event_name', ['some' => 'data']));

F2::config(string $configName, $defaultValue = null): mixed

Retrieve a configuration value from these sources in order:

  1. $GLOBALS['f2']['config'][$configName]

  2. F2::config()->env($configName)

  3. $GLOBALS['f2']['config']['defaults'][$configName]

  4. Config defaults provided by Manifest classes.

F2::env(string $name): string

Retrieve a configuration value from the environment. Will load a .env file from the project root. If a value is not found, it will load default.env from project root and check for the value there.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固