*/ include $system . '/lib/Scaffold/Environment.php'; /** * Set timezone, just in case it isn't set. PHP 5.3+ * throws a tantrum if you try and use time() without * this being set. */ date_default_timezone_set('GMT'); /** * Automatically load any Scaffold Classes */ Scaffold_Environment::auto_load(); /** * Let Scaffold handle errors */ Scaffold_Environment::handle_errors(); /** * Set the view to use for errors and exceptions */ Scaffold_Environment::set_view(realpath($system . '/views/error.php')); // ========================================= // = Start the scaffolding magic = // ========================================= // Make sure the config var is set if (!isset($config)) { $config = array(); } // The container creates Scaffold objects $container = new Scaffold_Container($system, $config); // This is where the magic happens $scaffold = $container->build();