<?php Autoloader::add_class('Sample\\Hello', PKGPATH . 'fuel-samplepackage/classes/hello.php');
<?php namespace Fuel\Tasks; \Autoloader::add_class('Sitemap', APPPATH . 'vendor/sitemap-php/Sitemap.php'); define("BASE", 'http://www.adltalk.com'); class Sitemap { public static function run() { $stmp = new \vendor\sitemap() - php\Sitemap(BASE); \Fuel\Core\Debug::dump($stmp); $stmp->setPath('../../public/sitemap/'); // $stmp->setFilename("sitemap"); //全掲示板を取得 $boards = \Model_Board::find('all'); if (count($boards) == 0) { die; } foreach ($boards as $board) { //掲示板を追加 // $stmp->addItem('/bbs/index/'.$board->shortName,"1.0","daily",date("Y/m/d H:i:s",$board->updated_at)); } // $stmp->createSitemapIndex(BASE.'/sitemap/', "Today"); } }
\Fuel::init('config.php'); // Config load. Config::load('site', 'site'); Config::load('term', 'term'); Config::load('icon', 'icon'); Config::load('page', 'page'); Config::load('template', 'template'); Config::load('exif', 'exif'); Config::load('less', 'less'); // Config of each module load. $modules = Site_Util::get_active_modules(); foreach ($modules as $module => $path) { if (file_exists(sprintf('%sconfig/%s.php', $path, $module))) { Config::load(sprintf('%s::%s', $module, $module), $module); } } // Config of navigation load. Config::load('navigation', 'navigation'); if (in_array(FBD_ENVIRONMENT, array('DEVELOPMENT', 'TEST'))) { Config::load('develop', 'develop'); } Site_Config::regulate_configs_for_module_loaded(); // Register the autoloader for library if (FBD_AWS_ACCESS_KEY && FBD_AWS_SECRET_KEY && FBD_AWS_S3_BUCKET) { Autoloader::add_namespace('Aws', APPPATH . 'vendor/aws/aws-sdk-php/src/Aws', true); } if (conf('library.goutte.isEnabled')) { $goutte_path = FBD_BASEPATH . 'fuel/vendor/fabpot/goutte/Goutte/'; Autoloader::add_namespace('Goutte', $goutte_path, true); Autoloader::add_class('Client', $goutte_path . 'Client.php'); }
$command.= "\$args = func_get_args(); "; $command.= "return call_user_func_array(array(\"".$class."\", \"".$method."\"), \$args); }"; @eval($command); } } } }; } // init namespaces and class names $nspace = 'Helper\\'; foreach ($helper_bt['classes'] as $key => $class) { $cpath = $helper_bt['override_folder'].strtolower($class).'.php'; if ( ! file_exists($cpath) OR ! is_file($cpath)) { class_alias($nspace.$key, $class); } else { Autoloader::add_class($nspace.$class, $cpath); } if ($boot) $boot($class); } $boot = null; });