PHP Classes

File: src/autoloader.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP Cookie Session Manager   src/autoloader.php   Download  
File: src/autoloader.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Cookie Session Manager
Store and retrieve data in cookies or PHP sessions
Author: By
Last change:
Date: 8 years ago
Size: 729 bytes
 

Contents

Class file image Download
<?php
/**
 * @title Manual Autoloader File
 *
 * @author Pierre-Henry Soria <ph7software@gmail.com>
 * @copyright (c) 2016, Pierre-Henry Soria. All Rights Reserved.
 * @license GNU General Public License 3 or later <http://www.gnu.org/licenses/gpl.html>
 * @package PH7 / CookieSession
 */

namespace PH7\CookieSession;

// Autoloading Classes Files
spl_autoload_register(function($sClass)
{
   
// Hack to remove namespace and backslash
   
$sClass = str_replace(array(__NAMESPACE__ . '\\', '\\'), DIRECTORY_SEPARATOR, $sClass);

   
// Get library classes
   
if (is_file(dirname(__FILE__) . $sClass . '.php')) {
        require_once
dirname(__FILE__) . $sClass . '.php';
    }
});