mossengine/helper 问题修复 & 功能扩展

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

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

mossengine/helper

Composer 安装命令:

composer require mossengine/helper

包简介

PHP Class that streamlines usages of static method helpers without needing to load in or define all the helper classes

关键字:

README 文档

README

A PHP library for calling many different helpers from a single point.

Source Code Download Package PHP Programming Language Build Status Codecov Code Coverage Read License Package downloads on Packagist

About

Helper functions are an important part of any project, however, depending on the implementation they can come at a small or great cost to system resources such as memory.

When you have an included functions file full of functions that you use throughout the project but not all at any one time, the cost you have here is memory allocation to store the functions ready for calling... Other practices with using Helper classes with smaller sets of dedicated static methods are an improvement, but you're still using memory to store those methods that are not needed.

This package allows you to call specific functions under certain categories without needing to load into memory anything more than what you need, it uses a dynamic loading style and also specifically designed helper classes for each specific method so that we only need to load what's needed.

A comparison of memory allocation between a full class of helper methods and this individual loading solution, the results was a 20KB allocation of memory vs 6KB. Larger sets of helper class methods can expect memory allocation sizes higher than 20KB... especially for more complex helper methods with more than a few lines of code.

Installation

Using composer to install

$ composer require mossengine/helper

Adding to package.json

{
    "require": {
        "mossengine/helper": "~1.0.0"
    }
}

Usage

Call helper method on a specific helper class

// Require the autoloader, normal composer stuff
require 'vendor/autoload.php';

// Call the Test method on the Test helper class
$result = Mossengine\Helper::Test()->Test();

Helpers

There are other helper classes you can use with this helper library

Mossengine/HelpersArray A library of array based helper methods to manipulate and analyse array structures.

Mossengine/HelpersStatement A library of statement based helper methods to compare and evaluate variable structures against each other.

Documentation

Read the docs for more details on Helper and how to call and extend with your own helper classes and methods

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固