PHP Classes

File: autoload.php

Recommend this page to a friend!
  Classes of Nitesh Apte  >  PHP YouTube Movie Trailers 2018, 2017, 2016 or Any Year  >  autoload.php  >  Download  
File: autoload.php
Role: Auxiliary script
Content type: text/plain
Description: Autoload classes
Class: PHP YouTube Movie Trailers 2018, 2017, 2016 or Any Year
Fetch and show YouTube movie trailers
Author: By
Last change:
Date: 6 years ago
Size: 607 bytes
 

Contents

Class file image Download
<?php
set_include_path
(get_include_path().PATH_SEPARATOR."lib/youtubetrailer/core");
set_include_path(get_include_path().PATH_SEPARATOR."lib/youtubetrailer/bean");
set_include_path(get_include_path().PATH_SEPARATOR."lib/youtubetrailer/exception");
set_include_path(get_include_path().PATH_SEPARATOR."lib/youtubetrailer/helper");

/**
 * Autoload method for dynamically loading classes.
 *
 * @param object $object Name of Class
 * @return void
 */
function __autoload($object) {
   
$split = explode("\\", $object);
   
$className = end($split);
    require_once(
"{$className}.php");
}

ini_set("display_errors", 1);