function __autoload($classname)
{
    $dependancyInjection = dependancyInjector::instance();
    $loaded = $dependancyInjection->load($classname);
    if (!$loaded) {
        trigger_error(E_USER_ERROR, "Class " . $classname . " was not registered.");
    }
}
Exemple #2
0
define("CONTENT_BUMPER", "bumpers");
define("CONTENT_ANNOUNCEMENT", "announcements");
define("CONTENT_FUNNY", "funny movies");
define("CONTENT_MUSIC", "musicvideos");
define("BUMPER_COMMERCIAL_START", "Commercial Start");
define("BUMPER_COMMERCIAL_END", "Commercial End");
define("BUMPER_PROMO", "Promo");
// bumpers are short movies, no support for leaders (hourly) yet..
// actions from the command line, webinterface or any other method (voodoo)
define("ACTION_REINDEX", "Reindex");
define("ACTION_REINDEX", 2);
include "./tools/getid3/getid3/getid3.php";
$getid3 = new getid3();
// configure di
require $path['scripts'] . "code/dependancyInjector.php";
$dependancyInjector = dependancyInjector::instance();
$dependancyInjector->add($path['scripts'] . "code/");
// configure timezome
date_default_timezone_set("Europe/Berlin");
// php error handling
error_reporting(E_ALL);
// increase execution time, for announcements.
set_time_limit(2400);
// script configuration
$config["createAnnouncements"] = false;
// Handle both webinterface actions as command line options...
// same set of option, but the way to enable this is different.
$action = ACTION_REINDEX;
if ($action == ACTION_REINDEX) {
    $contentIndexer = new contentIndexer();
    $contentIndexer->indexContent();