Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple PHP library for autoloading classes

tree: 2edaf8a5f9

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Autoloader

Autoloader is a simple-to-use PHP component that provides a generic, PSR0-compliant autoloader for use in PHP projects.

System-Wide Installation

Autoloader should be installed using the PEAR Installer. This installer is the PHP community's de-facto standard for installing PHP components.

sudo pear channel-discover pear.phix-project.org
sudo pear install --alldeps phix/Autoloader

As A Dependency On Your Component

If you are creating a component that relies on Autoloader, please make sure that you add Autoloader to your component's package.xml file:

<dependencies>
  <required>
    <package>
      <name>Autoloader</name>
      <channel>pear.phix-project.org</channel>
      <min>3.0.0</min>
      <max>3.999.9999</max>
    </package>
  </required>
</dependencies>

Usage

Simply include the autoloader, and it will automatically register itself using spl_autoload():

<?php

require_once 'psr0.autoloader.php';

?>

Development Environment

If you want to patch or enhance this component, you will need to create a suitable development environment. The easiest way to do that is to install phix4componentdev:

# phix4componentdev
sudo apt-get install php5-xdebug
sudo apt-get install php5-imagick
sudo pear channel-discover pear.phix-project.org
sudo pear -D auto_discover=1 install -Ba phix/phix4componentdev

You can then clone the git repository:

# Autoloader
git clone git://github.com/stuartherbert/Autoloader.git

Then, install a local copy of this component's dependencies to complete the development environment:

# build vendor/ folder
phing build-vendor

To make life easier for you, common tasks (such as running unit tests, generating code review analytics, and creating the PEAR package) have been automated using phing. You'll find the automated steps inside the build.xml file that ships with the component.

Run the command 'phing' in the component's top-level folder to see the full list of available automated tasks.

License

This component is released under the new-style BSD license.

  • Copyright (c) 2011, Stuart Herbert
  • Copyright (c) 2011, Gradwell dot com Ltd

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Something went wrong with that request. Please try again.