extend/alipay/pay/lotusphp_runtime/Autoloader/Autoloader.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
class LtAutoloader
{
	public $conf = array(
	/**
	 * 是否自动加载定义了函数的文件
	 *
	 * 可选项: 
	 * # true   自动加载 
	 * # false  跳过函数,只自动加载定义了class或者interface的文件
	 */
		"load_function" => true,

	/**
	 * 要扫描的文件类型
	 *
	 * 若该属性设置为array("php","inc","php3"), 
	 * 则扩展名为"php","inc","php3"的文件会被扫描, 
	 * 其它扩展名的文件会被忽略
	 */
		"allow_file_extension" => array("php", "inc"),

	/**
	 * 不扫描的目录
	 *
	 * 若该属性设置为array(".svn", ".setting"), 
	 * 则所有名为".setting"的目录也会被忽略
	 */
		"skip_dir_names" => array(".svn"),
	);

	public $storeHandle;
	public $autoloadPath;
	protected $functionFileMapping;
	protected $fileStore;

	public function init()
	{
		if (!is_object($this->storeHandle))
		{
			$this->storeHandle = new LtStoreMemory;
			$this->fileStore = new LtStoreFile;
			$this->fileStore->prefix = 'LtAutoloader-token-cache';
			$this->fileStore->useSerialize = true;
			$this->fileStore->init();
		}
		// Whether scanning directory
		if (0 == $this->storeHandle->get(".class_total") && 0 == $this->storeHandle->get(".function_total"))
		{
			$this->storeHandle->add(".class_total", 0);
			$this->storeHandle->add(".function_total", 0);
			$this->storeHandle->add(".functions", array(), 0);
			$autoloadPath = $this->preparePath($this->autoloadPath);
			foreach($autoloadPath as $key => $path)
			{
				if (is_file($path))
				{
					$this->addFileMap($path);
					unset($autoloadPath[$key]);
				}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。