承接 awps/loader 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

awps/loader

Composer 安装命令:

composer require awps/loader

包简介

Simple loader that is designed to work with both classes and normal PHP files.

README 文档

README

Loader

A simple loader that is designed to work with both classes and normal PHP files.

Installation

With composer:

composer require awps/loader

Manually:

require_once 'getloader.php';

Usage

Load PHP classes:

Awps\Loader::loadClasses( $path, $namespace );

This will autoload all PHP classes from $path and will assume that the namespace in those classes is $namespace;

Load simple PHP files:

Awps\Loader::loadFiles( $path, $pattern );

This will autoload all php files from $path that contains $pattern in their name.

Examples

// Autoload classes from `inc` folder and set the namespace to `Awesome`
Awps\Loader::loadClasses( __DIR__ . 'inc', 'Awesome' );

// Now you can initialize a class. For example: 
new Awesome\Something();

// -------------------------------------------------------

// Include all php files from `functions`
Awps\Loader::loadFiles( __DIR__ . 'functions', 'component-' );

// This one will include all php files that contains `component-` string in their name
// from `functions` directory.
// Now you may call a function defined in one of those files. For example: 
do_something_special();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固