Skip to content

qycloud/classloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ClassLoader:

ClassLoader is a tool to auto loading the missing class while the file's name starts with lowercase char.

Getting Started:

  • Create composer.json file in root directory of your application:
 {
    "require": {
        "php": ">=5.4.0",
        "nanjingboy/classloader": "*"
    }
}

Usage Example:

Imagine the following application structure:

application
├── models
│   └─── user.php

If we want to access the class Models\User, we should register a classLoader like this:

<?php
require __DIR__ . '/vendor/autoload.php';
$classLoader = new CloassLoader();
$classLoader->addPrefix('Models', __DIR__);
$classLoader->register();

License:

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages