Giter Club home page Giter Club logo

aload's Introduction

aLoad

Automatically loads PHP files from a given path based on a modular separator.



INTRODUCTION

aLoad ('a' abbr. for auto) is a flexible auto file loader primarily based on a modular separator.

SETUP INFORMATION

This script requires no additional frameworks or libraries.

Use your CLI and enter the following to clone:
git clone https://github.com/thielicious/aLoad.git

USAGE

aLoad::register(array module || aLoad::ALL, [string folderpath]);

Simply register modules and define the foldername if your PHP classes reside in a different directory.

  • modules are separated file contents. Usually classes are named "class" e.g. email.class.php and additional code that is included are called "inc" e.g. utilities.inc.php. Feel free to name them however you want.
  • If you don't want to use modules, you may use the constant "aLoad::ALL" as the first parameter to register all PHP scripts which have no modules.
  • Leave the parameter for the foldername blank if your scripts are in your root directory.
  • Feel free to remove or change the namespace.

EXAMPLE


require_once "scripts/aLoad.class.php";
aLoad::register(["class", "inc"], "scripts/");

This example above will register all PHP files containing the module name "class" and "inc" in the folder "scripts".


require_once "aLoad.class.php";
aLoad::register(aLoad::ALL);

This above will register all PHP files without modules in your root directory.



If you encounter any bugs, feel free to open up an issue, thank you.

thielicious.github.io

aload's People

Contributors

thedefinitionist avatar

Watchers

James Cloos avatar  avatar

aload's Issues

What are the modules and how are they applied?

Hello, your autoload is interesting, but there is no clear example nor does it look like using it in folder structure.

  1. What are [" class"," inc"]? (file names? class name?)
  2. Do you have a practical application example?
  3. You must put 2 scenarios for when you put your modules and also the ALL

I await your prompt reply

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.