/** * Autoloads symfony * Note: This is not compatible with ->bootstrap() * Code adopted from command/sfSymfonyCommandApplication.class.php */ public function autoload() { if ($this->autoload) { return; } $this->autoload = 'simple'; require_once $this->sf_lib_dir . '/util/sfCore.class.php'; require_once $this->sf_lib_dir . '/config/sfConfig.class.php'; require_once $this->sf_lib_dir . '/util/sfSimpleAutoload.class.php'; require_once $this->sf_lib_dir . '/util/sfToolkit.class.php'; require_once $this->sf_lib_dir . '/util/sfFinder.class.php'; sfConfig::add(array('sf_symfony_lib_dir' => $this->sf_lib_dir, 'sf_symfony_data_dir' => $this->sf_lib_dir)); // directory layout sfCore::initDirectoryLayout($this->sf_lib_dir); // include path set_include_path(sfConfig::get('sf_lib_dir') . PATH_SEPARATOR . sfConfig::get('sf_app_lib_dir') . PATH_SEPARATOR . sfConfig::get('sf_model_dir') . PATH_SEPARATOR . get_include_path()); $cache = sfToolkit::getTmpDir() . DIRECTORY_SEPARATOR . sprintf('limeade_autoload_%s.data', md5(__FILE__)); $autoloader = sfSimpleAutoload::getInstance($cache); $autoloader->register(); $finder = sfFinder::type('file')->ignore_version_control()->prune('test')->prune('vendor')->name('*.php'); $autoloader->addFiles($finder->in(sfConfig::get('sf_symfony_lib_dir'))); $autoloader->addFiles($finder->in($this->project_root)); $autoloader->addDirectory(sfConfig::get('sf_root_dir') . '/plugins'); return $this; }
function init() { //mantisgraph_autoload(); spl_autoload_register(array('MantisGraphPlugin', 'autoload')); $t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR; set_include_path(get_include_path() . PATH_SEPARATOR . $t_path); }
public static function bootstrap() { $aimeos = self::getAimeos(); $includepaths = $aimeos->getIncludePaths(); $includepaths[] = get_include_path(); set_include_path(implode(PATH_SEPARATOR, $includepaths)); }
function __construct() { //$dir = getcwd(); //$path = $dir."/PEAR"; $path = dirname(__FILE__) . "/PEAR"; set_include_path(get_include_path() . PATH_SEPARATOR . $path); $inc_path = get_include_path(); chdir(dirname(__FILE__)); date_default_timezone_set("Asia/Tokyo"); require_once "setting.php"; $this->_screen_name = $screen_name; $this->_consumer_key = $consumer_key; $this->_consumer_secret = $consumer_secret; $this->_access_token = $access_token; $this->_access_token_secret = $access_token_secret; $this->_replyLoopLimit = $replyLoopLimit; $this->_footer = $footer; $this->_dataSeparator = $dataSeparator; $this->_logDataFile = "log.dat"; $this->_log = json_decode(file_get_contents($this->_logDataFile), true); $this->_latestReply = $this->_log["latest_reply"]; $this->_latestReplyTimeline = $this->_log["latest_reply_tl"]; require_once "HTTP/OAuth/Consumer.php"; $this->OAuth_Consumer_build(); $this->printHeader(); }
/** * Bootstrap code for Horde PEAR packages. * * @param string $dir Base directory of tests. * @param boolean $no_autoload Don't run default Horde_Test autoload * tasks. */ public static function bootstrap($dir, $no_autoload = false) { if (self::$_runonce) { return; } if (!$no_autoload) { // Catch strict standards error_reporting(E_ALL | E_STRICT); // Set up autoload $base = $dir; while ($base != '/' && basename($base) != 'Horde') { $base = dirname($base); } $base = dirname($base); if ($base) { set_include_path($base . PATH_SEPARATOR . $base . '/../lib' . PATH_SEPARATOR . get_include_path()); } require_once 'Horde/Test/Autoload.php'; Horde_Test_Autoload::init(); } if (file_exists($dir . '/Autoload.php')) { require_once $dir . '/Autoload.php'; } self::$_runonce = true; }
public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInit0b6254f8262d899239feb70fb0c19f97', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit0b6254f8262d899239feb70fb0c19f97', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); $includePaths = (require __DIR__ . '/include_paths.php'); array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths)); $map = (require __DIR__ . '/autoload_namespaces.php'); foreach ($map as $namespace => $path) { $loader->set($namespace, $path); } $map = (require __DIR__ . '/autoload_psr4.php'); foreach ($map as $namespace => $path) { $loader->setPsr4($namespace, $path); } $classMap = (require __DIR__ . '/autoload_classmap.php'); if ($classMap) { $loader->addClassMap($classMap); } $loader->register(true); return $loader; }
public function setUp() { // load all required PEAR libs from vendor folder $path = __DIR__ . '/../vendor/'; set_include_path($path . PATH_SEPARATOR . get_include_path()); require_once 'PHPUnit/Autoload.php'; }
private function setIncludePath() { if (!$this->doneIncludePath) { set_include_path(get_include_path() . PATH_SEPARATOR . plugin_dir_path(__FILE__)); $this->doneIncludePath = true; } }
function initCustomConfig() { define('MODE', 'CHAT'); define('ROOT_PATH', str_replace('\\', '/', dirname(dirname(__FILE__))) . '/'); set_include_path(ROOT_PATH); $database = array(); require 'includes/config.php'; $this->setConfig('dbConnection', 'type', 'mysqli'); $this->setConfig('dbConnection', 'host', $database['host']); $this->setConfig('dbConnection', 'user', $database['user']); $this->setConfig('dbConnection', 'pass', $database['userpw']); $this->setConfig('dbConnection', 'name', $database['databasename']); $dbTableNames = Database::get()->getDbTableNames(); $dbTableNames = array_combine($dbTableNames['keys'], $dbTableNames['names']); $this->setConfig('dbTableNames', 'online', $dbTableNames['%%CHAT_ON%%']); $this->setConfig('dbTableNames', 'messages', $dbTableNames['%%CHAT_MES%%']); $this->setConfig('dbTableNames', 'bans', $dbTableNames['%%CHAT_BAN%%']); $this->setConfig('dbTableNames', 'invitations', $dbTableNames['%%CHAT_INV%%']); $config = Config::get(); $this->setConfig('chatBotName', false, $config->chat_botname); $this->setConfig('allowUserMessageDelete', false, (bool) $config->chat_allowdelmes); $this->setConfig('allowNickChange', false, (bool) $config->chat_nickchange); $this->setConfig('chatClosed', false, (bool) $config->chat_closed); $this->setConfig('allowPrivateChannels', false, (bool) $config->chat_allowchan); $this->setConfig('allowPrivateMessages', false, (bool) $config->chat_allowmes); $this->setConfig('defaultChannelName', false, $config->chat_channelname); $this->setConfig('showChannelMessages', false, (bool) $config->chat_logmessage); $this->setConfig('langAvailable', false, Language::getAllowedLangs()); $this->setConfig('langNames', false, Language::getAllowedLangs(false)); $this->setConfig('forceAutoLogin', false, true); $this->setConfig('contentType', false, 'text/html'); }
/** * Tests that when registering that NIMBLES_PATH is made the first include path * @return void */ public function testRegister() { $includepaths = explode(PATH_SEPARATOR, get_include_path()); foreach ($includepaths as $index => $path) { if (NIMBLES_PATH === $path) { unset($includepaths[$index]); break; } } set_include_path(implode(PATH_SEPARATOR, $includepaths)); $functions = spl_autoload_functions(); if (is_array($functions) && 'Nimbles\\Core\\Loader' === $functions[0][0]) { spl_autoload_unregister('Nimbles\\Core\\Loader::autoload'); } if (false === ($functions = spl_autoload_functions())) { $functions = array(); } array_unshift($includepaths, NIMBLES_PATH); \Nimbles\Core\Loader::register(); $this->assertSame($includepaths, explode(PATH_SEPARATOR, get_include_path())); if (function_exists('spl_autoload_case_sensitive')) { $autoload = 'spl_autoload'; } else { $autoload = array('Nimbles\\Core\\Loader', 'autoload'); } $registered = spl_autoload_functions(); $this->assertContains($autoload, $registered); }
/** * Add a library to the autoloader * * @example * PPI_Autoload::add('Zend', array( * 'path' => SYSTEMPATH . 'Vendor/', * 'prefix' => 'Zend_' * )); * * @param string $key The Key, This is used for exists() and remove() * @param array $p_aOptions */ static function add($key, array $p_aOptions) { self::$_libraries[$key] = $p_aOptions; if (isset($p_aOptions['path'])) { set_include_path(get_include_path() . PATH_SEPARATOR . $p_aOptions['path']); } }
public function indexAction() { global $controller; $controller = $this; require_once $GLOBALS['g_campsiteDir'] . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'campsite_constants.php'; require_once CS_PATH_CONFIG . DIR_SEP . 'install_conf.php'; $local_path = dirname(__FILE__) . '/include'; set_include_path($local_path . PATH_SEPARATOR . get_include_path()); require_once CS_PATH_INCLUDES . DIR_SEP . 'campsite_init.php'; // initializes the campsite object $campsite = new CampSite(); // loads site configuration settings $campsite->loadConfiguration(CS_PATH_CONFIG . DIR_SEP . 'configuration.php'); // starts the session $campsite->initSession(); // initiates the context $campsite->init(); // dispatches campsite $campsite->dispatch(); if (APPLICATION_ENV !== 'development' || APPLICATION_ENV !== 'dev') { set_error_handler(create_function('', 'return true;')); } // renders the site $campsite->render(); // triggers an event after displaying $campsite->event('afterRender'); }
/** * Bootstrap of the app */ public function __construct() { /* Determine called profile */ $this->determineProfile(); /* Load Profile configs before include path get the good default module */ include 'profiles/' . PROFILE . '/config.php'; self::$config = $config; /* set include path with profile before module to allow profile's files to override module's files */ set_include_path('.' . PATH_SEPARATOR . './' . PROFILE_PATH . PATH_SEPARATOR . './modules/' . PATH_SEPARATOR . './profiles/' . PROFILE . '/modules/' . $config['defaultModule'] . '/' . PATH_SEPARATOR . './modules/' . $config['defaultModule'] . '/'); /* Check if it's a file */ if ($this->sendFile($_GET['parsiurl']) === FALSE) { /* If it isn't a file, Parsimony will search and display the good page */ define('BASE_PATH', $config['BASE_PATH']); define('PREFIX', $config['db']['prefix']); /* Init autoload */ spl_autoload_register('\\core\\classes\\app::autoLoad'); /* Init active modules - set class_alias */ class_alias('core\\classes\\app', 'app'); class_alias('core\\classes\\module', 'module'); $this->launchActiveModules(); /* Init request and response */ self::$request = new request($_GET['parsiurl']); self::$response = new response(); /* Dispatch Request and display response */ self::$request->dispatch(); echo self::$response->getContent(); } }
public function load($template, $options = array()) { $options = array_merge(array("master" => "master.php", "path" => null), $options); $path = $options["path"]; $this->template_name = basename($template, '.php'); if (empty($path)) { $path = Ac::path("templates"); } if (!is_dir($path)) { Ac::exception("The templates directory does not exist: " . $path); } // To prevent wrong includes, we do a chdir chdir($path); if (is_readable($template)) { $file = $this->template_file = realpath($template); } else { $file = $this->template_file = $path . $template; } if ($options["master"] != NULL) { if (is_readable($options["master"])) { $file = realpath($options["master"]); } else { $file = $path . $options["master"]; } } set_include_path(get_include_path() . PATH_SEPARATOR . $path . PATH_SEPARATOR); $content = static::process($file, $this->vars()); chdir(AC_PATH); return $content; }
public function main() { if (!is_dir(realpath($this->testdirectory))) { throw new BuildException("NativePHPUnitTask requires a Test Directory path given, '" . $this->testdirectory . "' given."); } set_include_path(realpath($this->testdirectory) . PATH_SEPARATOR . get_include_path()); $printer = new NativePhpunitPrinter(); $arguments = array('configuration' => $this->configuration, 'coverageClover' => $this->coverageClover, 'junitLogfile' => $this->junitlogfile, 'printer' => $printer); require_once "PHPUnit/TextUI/TestRunner.php"; $runner = new PHPUnit_TextUI_TestRunner(); $suite = $runner->getTest($this->test, $this->testfile, true); try { $result = $runner->doRun($suite, $arguments); /* @var $result PHPUnit_Framework_TestResult */ if ($this->haltonfailure && $result->failureCount() > 0 || $this->haltonerror && $result->errorCount() > 0) { throw new BuildException("PHPUnit: " . $result->failureCount() . " Failures and " . $result->errorCount() . " Errors, " . "last failure message: " . $printer->getMessages()); } $this->log("PHPUnit Success: " . count($result->passed()) . " tests passed, no " . "failures (" . $result->skippedCount() . " skipped, " . $result->notImplementedCount() . " not implemented)"); // Hudson for example doesn't like the backslash in class names if (file_exists($this->coverageClover)) { $this->log("Generated Clover Coverage XML to: " . $this->coverageClover); $content = file_get_contents($this->coverageClover); $content = str_replace("\\", ".", $content); file_put_contents($this->coverageClover, $content); unset($content); } } catch (\Exception $e) { throw new BuildException("NativePhpunitTask failed: " . $e->getMessage()); } }
/** * Construct a request handler for candidate instrument data * @param string $method The HTTP method to be handled * @param string $CandID The CandID this API call is for * @param string $Visit The Visit this API call is for * @param string $Instrument The instrument this API call is for * @param boolean $bDDE If true, handle DDE instrument instead of * normal instrument data * @param boolean $bFlags If true, include instrument flag data in * serialization */ public function __construct($method, $CandID, $Visit, $Instrument, $bDDE, $bFlags) { if (empty($this->AllowedMethods)) { $this->AllowedMethods = ['GET', 'PUT', 'PATCH', 'OPTIONS']; } $this->AutoHandleRequestDelegation = false; $this->bDDE = $bDDE; $this->bFlags = $bFlags; parent::__construct($method, $CandID, $Visit); // instruments may need access to project libraries set_include_path(get_include_path() . ":" . __DIR__ . "/../../../../project/libraries"); include_once "NDB_BVL_Instrument.class.inc"; $CommentID = $this->DB->pselectOne("SELECT CommentID FROM flag f\n LEFT JOIN session s ON (s.ID=f.SessionID AND s.Visit_label=:VL)\n LEFT JOIN candidate c USING (CandID)\n WHERE Test_name=:TN AND s.CandID=:CID AND\n s.Active='Y' AND c.Active='Y' AND f.CommentID NOT LIKE 'DDE%'", array('VL' => $this->VisitLabel, 'TN' => $Instrument, 'CID' => $this->CandID)); if (empty($CommentID)) { $this->header("HTTP/1.1 404 Not Found"); $this->error("Invalid instrument for candidate"); $this->safeExit(0); } if ($this->bDDE) { $CommentID = 'DDE_' . $CommentID; } try { $this->Instrument = \NDB_BVL_Instrument::factory($Instrument, $CommentID, null, true); } catch (Exception $e) { $this->header("HTTP/1.1 404 Not Found"); $this->error("Invalid instrument"); $this->safeExit(0); } $this->handleRequest(); }
/** * Convert the array of paths into a string with path separators. The i * action parameter is used to determine how to deal with the original * include path. should we append, prepend, or replace it * * @param mixed $paths * @param string $action how to deal with the original path * @return NULL */ public function setPath($paths, $action = 'replace') { /* a single path was passed in */ if (is_string($paths) && !empty($paths)) { $pathString = $paths; } else { if (is_array($paths) && !empty($paths)) { $pathString = implode(PATH_SEPARATOR, $paths); } else { return FALSE; } } /* * The default action is to replace the include path. If * action is given with either append or prepend the * paths will be concatenated accordingly */ $includePath = get_include_path(); if ('append' === $action) { $pathString = $includePath . PATH_SEPARATOR . $pathString; } else { if ('prepend' === $action) { $pathString .= PATH_SEPARATOR . $includePath; } } return set_include_path($pathString); }
public static function minimalBootstrap() { if (!defined('VENDOR_PATH')) { define('VENDOR_PATH', 'vendor'); } if (VENDOR_PATH == '../vendor') { $kwfPath = '..'; } else { $kwfPath = VENDOR_PATH . '/koala-framework/koala-framework'; } if (!defined('KWF_PATH')) { define('KWF_PATH', $kwfPath); } //reset include path, don't use anything from php.ini set_include_path('.' . PATH_SEPARATOR . $kwfPath . PATH_SEPARATOR . self::_getZendPath()); require_once $kwfPath . '/Kwf/Loader.php'; Kwf_Loader::registerAutoload(); Zend_Registry::setClassName('Kwf_Registry'); $configSection = call_user_func(array(Kwf_Setup::$configClass, 'getDefaultConfigSection')); Kwf_Setup::$configSection = $configSection; error_reporting(E_ALL ^ E_STRICT); class_exists('Kwf_Trl'); //trigger autoload umask(00); //nicht 002 weil wwwrun und kwcms in unterschiedlichen gruppen }
function __construct (& $subject, $config) { //if (self::$_this) // return self::$_this; parent::__construct($subject, $config); $this->_loggable = TRUE; $this->tableFields = array_keys($this->getTableSQLFields()); $this->_tablepkey = 'id'; $this->_tableId = 'id'; $varsToPush = $this->getVarsToPush(); //$this->setEncryptedFields(array('params')); $this->setConfigParameterable($this->_configTableFieldName, $varsToPush); $this->setCryptedFields(array('accessKey', 'secretKey')); $amazon_library = JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'amazon' . DS . 'library' ; //set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__) . "/../../.")); set_include_path($amazon_library); $this->loadAmazonClass('OffAmazonPaymentsService_Client'); if (!JFactory::getApplication()->isSite()) { JFactory::getDocument()->addScript(JURI::root(true) . '/plugins/vmpayment/amazon/assets/js/admin.js'); JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/plugins/vmpayment/amazon/assets/css/amazon-admin.css'); } }
function __construct() { $this->config = array(); $this->page = array(); $this->pager = array(); $this->scheme = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 'https' : 'http'; $this->hostname = str_replace('www.', '', $_SERVER['SERVER_NAME']); set_include_path("include/{$this->hostname}" . PATH_SEPARATOR . 'include' . PATH_SEPARATOR . '.'); if (substr($_SERVER['QUERY_STRING'], 0, 2) == "q=") { $_SERVER['QUERY_STRING'] = substr($_SERVER['QUERY_STRING'], 2); } $this->cmd = trim($_GET['q'], '/'); $this->argv = explode('/', $this->cmd); $this->argc = count($this->argv); if (array_key_exists('0', $this->argv) && strlen($this->argv[0])) { $this->module = $this->argv[0]; } else { $this->module = 'home'; } if ($this->cmd == '.well-known/host-meta') { require_once 'include/hostxrd.php'; } $this->pager['page'] = x($_GET, 'page') ? $_GET['page'] : 1; $this->pager['itemspage'] = 50; $this->pager['start'] = $this->pager['page'] * $this->pager['itemspage'] - $this->pager['itemspage']; $this->pager['total'] = 0; }
public function execute() { global $IP; # Make sure we have --configuration or PHPUnit might complain if (!in_array('--configuration', $_SERVER['argv'])) { //Hack to eliminate the need to use the Makefile (which sucks ATM) array_splice($_SERVER['argv'], 1, 0, array('--configuration', $IP . '/tests/phpunit/suite.xml')); } # --with-phpunitdir let us override the default PHPUnit version if ($phpunitDir = $this->getOption('with-phpunitdir')) { # Sanity checks if (!is_dir($phpunitDir)) { $this->error("--with-phpunitdir should be set to an existing directory", 1); } if (!is_readable($phpunitDir . "/PHPUnit/Runner/Version.php")) { $this->error("No usable PHPUnit installation in {$phpunitDir}.\nAborting.\n", 1); } # Now prepends provided PHPUnit directory $this->output("Will attempt loading PHPUnit from `{$phpunitDir}`\n"); set_include_path($phpunitDir . PATH_SEPARATOR . get_include_path()); # Cleanup $args array so the option and its value do not # pollute PHPUnit $key = array_search('--with-phpunitdir', $_SERVER['argv']); unset($_SERVER['argv'][$key]); // the option unset($_SERVER['argv'][$key + 1]); // its value $_SERVER['argv'] = array_values($_SERVER['argv']); } }
public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInitc1979ea69b1d8f4059205f2b1ddf2ab9', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInitc1979ea69b1d8f4059205f2b1ddf2ab9', 'loadClassLoader')); $includePaths = (require __DIR__ . '/include_paths.php'); array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths)); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInitc1979ea69b1d8f4059205f2b1ddf2ab9::getInitializer($loader)); } else { $map = (require __DIR__ . '/autoload_namespaces.php'); foreach ($map as $namespace => $path) { $loader->set($namespace, $path); } $map = (require __DIR__ . '/autoload_psr4.php'); foreach ($map as $namespace => $path) { $loader->setPsr4($namespace, $path); } $classMap = (require __DIR__ . '/autoload_classmap.php'); if ($classMap) { $loader->addClassMap($classMap); } } $loader->register(true); return $loader; }
public static function update($version, $backupBase) { if (!is_dir($backupBase)) { throw new \Exception("Backup directory {$backupBase} is not found"); } set_include_path($backupBase . PATH_SEPARATOR . $backupBase . '/core/lib' . PATH_SEPARATOR . $backupBase . '/core/config' . PATH_SEPARATOR . $backupBase . '/3rdparty' . PATH_SEPARATOR . $backupBase . '/apps' . PATH_SEPARATOR . get_include_path()); $tempDir = self::getTempDir(); Helper::mkdir($tempDir, true); $installed = Helper::getDirectories(); $sources = Helper::getSources($version); try { $thirdPartyUpdater = new Location_3rdparty($installed[Helper::THIRDPARTY_DIRNAME], $sources[Helper::THIRDPARTY_DIRNAME]); $thirdPartyUpdater->update($tempDir . '/' . Helper::THIRDPARTY_DIRNAME); self::$processed[] = $thirdPartyUpdater; $coreUpdater = new Location_Core($installed[Helper::CORE_DIRNAME], $sources[Helper::CORE_DIRNAME]); $coreUpdater->update($tempDir . '/' . Helper::CORE_DIRNAME); self::$processed[] = $coreUpdater; $appsUpdater = new Location_Apps('', $sources[Helper::APP_DIRNAME]); $appsUpdater->update($tempDir . '/' . Helper::APP_DIRNAME); self::$processed[] = $appsUpdater; } catch (\Exception $e) { self::rollBack(); self::cleanUp(); throw $e; } // zip backup $zip = new \ZipArchive(); if ($zip->open($backupBase . ".zip", \ZIPARCHIVE::CREATE) === true) { Helper::addDirectoryToZip($zip, $backupBase, $backupBase); $zip->close(); \OCP\Files::rmdirr($backupBase); } return true; }
public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInit1eb5cffb2cab52b785cc53528b1e13a2', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit1eb5cffb2cab52b785cc53528b1e13a2', 'loadClassLoader')); $includePaths = (require __DIR__ . '/include_paths.php'); array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths)); $map = (require __DIR__ . '/autoload_namespaces.php'); foreach ($map as $namespace => $path) { $loader->set($namespace, $path); } $map = (require __DIR__ . '/autoload_psr4.php'); foreach ($map as $namespace => $path) { $loader->setPsr4($namespace, $path); } $classMap = (require __DIR__ . '/autoload_classmap.php'); if ($classMap) { $loader->addClassMap($classMap); } $loader->register(true); return $loader; }
public function helper($class) { $class = $this->trim_namespace($class); set_include_path($this->registry->appDir . '/helpers/'); spl_autoload_extensions('.help.php'); spl_autoload($class); }
public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInit46390df264f3e25339b844dea17d85e4', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit46390df264f3e25339b844dea17d85e4', 'loadClassLoader')); $includePaths = (require __DIR__ . '/include_paths.php'); array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths)); $map = (require __DIR__ . '/autoload_namespaces.php'); foreach ($map as $namespace => $path) { $loader->set($namespace, $path); } $map = (require __DIR__ . '/autoload_psr4.php'); foreach ($map as $namespace => $path) { $loader->setPsr4($namespace, $path); } $classMap = (require __DIR__ . '/autoload_classmap.php'); if ($classMap) { $loader->addClassMap($classMap); } $loader->register(true); $includeFiles = (require __DIR__ . '/autoload_files.php'); foreach ($includeFiles as $file) { composerRequire46390df264f3e25339b844dea17d85e4($file); } return $loader; }
public function __construct(&$manager) { $this->_manager = $manager; set_include_path(Zend_Registry::get('config')->login->module->wp->wpPath . PATH_SEPARATOR . get_include_path()); global $wpdb; @(require_once 'wp-config.php'); }
public static function getLoader() { if (null !== self::$loader) { return self::$loader; } spl_autoload_register(array('ComposerAutoloaderInit0ff06a20d13931ad3d71bf10770c91f3', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit0ff06a20d13931ad3d71bf10770c91f3', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); $includePaths = (require __DIR__ . '/include_paths.php'); array_push($includePaths, get_include_path()); set_include_path(join(PATH_SEPARATOR, $includePaths)); $map = (require __DIR__ . '/autoload_namespaces.php'); foreach ($map as $namespace => $path) { $loader->set($namespace, $path); } $map = (require __DIR__ . '/autoload_psr4.php'); foreach ($map as $namespace => $path) { $loader->setPsr4($namespace, $path); } $classMap = (require __DIR__ . '/autoload_classmap.php'); if ($classMap) { $loader->addClassMap($classMap); } $loader->register(true); $includeFiles = (require __DIR__ . '/autoload_files.php'); foreach ($includeFiles as $file) { composerRequire0ff06a20d13931ad3d71bf10770c91f3($file); } return $loader; }
function insertarExcel($array) { $uploadOk = 1; $time = time(); $fecha = date("Y-m-d", $time); $target_dir = "../documents/"; $target_file = $target_dir . basename($_FILES["archivoExcel"]["name"]); move_uploaded_file($array["archivoExcel"]["tmp_name"], $target_file); set_include_path(get_include_path() . PATH_SEPARATOR . '../complements/PHPExcel-1.8/Classes/'); $inputFileType = 'Excel2007'; include 'PHPExcel/IOFactory.php'; $inputFileName = $target_file; $objReader = PHPExcel_IOFactory::createReader($inputFileType); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load($inputFileName); $sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true); require_once "../db/conexiones.php"; $consulta = new Conexion(); foreach ($sheetData as $datos) { $nombreSinAcentos = sanear_string($datos['B']); $nombre = strtoupper(trim($nombreSinAcentos)); $datosEmpleado = $consulta->Conectar("postgres", "SELECT * FROM userinfo WHERE UPPER(name)='" . $nombre . "'"); if ($datosEmpleado) { $sqlInsert = $this->invoco->Conectar("postgres", "INSERT INTO horario_personal (user_id, banda_id, fecha) VALUES (" . $datosEmpleado[0]['userid'] . "," . $datos['C'] . ", '" . $fecha . "')"); } } return "Se insertaron los datos Exitosamente!"; }
public static function initConfig() { //Include Path set_include_path(get_include_path() . PATH_SEPARATOR . Constants::liteFrameDir . PATH_SEPARATOR . Constants::appDir); //AutoLoad require_once '../autoload.php'; }