Login   Register  
PHP Classes
elePHPant
Icontem

File: src/autoload.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jose Luis Quintana  >  GDImage PHP Canvas to Image  >  src/autoload.php  >  Download  
File: src/autoload.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: GDImage PHP Canvas to Image
Create and compose canvas images from other images
Author: By
Last change:
Date: 5 months ago
Size: 638 bytes
 

Contents

Class file image Download
<?php

/**
 * PHPUnit Autoloader GDImage Library
 * @author Jose Luis Quintana <joseluisquintana20@gmail.com>
 */
function gdimage_loader($class) {
    static 
$classes null;

    if (
$classes === null) {
        
$classes = array(
            
'GDUtils' => '/GDImage/GDUtils.php',
            
'GDImage' => '/GDImage/GDImage.php',
            
'GDFigure' => '/GDImage/GDFigure.php',
            
'GDCanvas' => '/GDImage/GDCanvas.php',
            
'GDText' => '/GDImage/GDText.php'
        
);
    }

    
$cn $class;

    if (isset(
$classes[$cn])) {
        require 
__DIR__ $classes[$cn];
    }
}

spl_autoload_register('gdimage_loader');