当前位置: 首页>>代码示例>>PHP>>正文


PHP DOMPDF_autoload函数代码示例

本文整理汇总了PHP中DOMPDF_autoload函数的典型用法代码示例。如果您正苦于以下问题:PHP DOMPDF_autoload函数的具体用法?PHP DOMPDF_autoload怎么用?PHP DOMPDF_autoload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DOMPDF_autoload函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __autoload

function __autoload($class)
{
    /*
     * Look through the include path to see if a file for this class can be found
     */
    $class_path = preg_replace('/_/', DIRECTORY_SEPARATOR, $class) . '.php';
    foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
        if (file_exists($path . DIRECTORY_SEPARATOR . $class_path)) {
            require_once $path . DIRECTORY_SEPARATOR . $class_path;
            return;
        }
    }
    /*
     * If we have gotten to this point the requested class is nowhere in the include path
     * ...time to look for a few patterns that might make this a "special class"
     */
    if (preg_match('/Model$/', $class)) {
        $model_path = implode(DIRECTORY_SEPARATOR, array(APPLICATION_PATH, 'models', $class . '.php'));
        if (file_exists($model_path)) {
            require_once $model_path;
            return;
        }
    }
    DOMPDF_autoload($class);
}
开发者ID:humansky,项目名称:qframe,代码行数:25,代码来源:utility.php

示例2: __autoload

function __autoload($class_name) {
	if(function_exists('DOMPDF_autoload')) {
		DOMPDF_autoload($class_name);
	}
	
	if(file_exists("../obj/" . $class_name . '.php')){
		include_once("../obj/" . $class_name . '.php');
	}
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:init.php

示例3: __autoload

/**
 * Class autoloader
 *
 * Include classes automatically when they are instantiated.
 * @param string
 */
function __autoload($strClassName)
{
    $objCache = FileCache::getInstance('autoload');
    // Try to load the class name from the session cache
    if (!$GLOBALS['TL_CONFIG']['debugMode'] && isset($objCache->{$strClassName})) {
        if (@(include_once TL_ROOT . '/' . $objCache->{$strClassName})) {
            return;
            // The class could be loaded
        } else {
            unset($objCache->{$strClassName});
            // The class has been removed
        }
    }
    $strLibrary = TL_ROOT . '/system/libraries/' . $strClassName . '.php';
    // Check for libraries first
    if (file_exists($strLibrary)) {
        include_once $strLibrary;
        $objCache->{$strClassName} = 'system/libraries/' . $strClassName . '.php';
        return;
    }
    // Then check the modules folder
    foreach (scan(TL_ROOT . '/system/modules/') as $strFolder) {
        if (substr($strFolder, 0, 1) == '.') {
            continue;
        }
        $strModule = TL_ROOT . '/system/modules/' . $strFolder . '/' . $strClassName . '.php';
        if (file_exists($strModule)) {
            include_once $strModule;
            $objCache->{$strClassName} = 'system/modules/' . $strFolder . '/' . $strClassName . '.php';
            return;
        }
    }
    // HOOK: include Swift classes
    if (class_exists('Swift', false)) {
        Swift::autoload($strClassName);
        return;
    }
    // HOOK: include DOMPDF classes
    if (function_exists('DOMPDF_autoload')) {
        DOMPDF_autoload($strClassName);
        return;
    }
    trigger_error(sprintf('Could not load class %s', $strClassName), E_USER_ERROR);
}
开发者ID:jens-wetzel,项目名称:use2,代码行数:50,代码来源:functions.php

示例4: __autoload

 /**
  * Default __autoload() function
  *
  * @param string $class
  */
 function __autoload($class)
 {
     DOMPDF_autoload($class);
 }
开发者ID:baisoo,项目名称:axiscommerce,代码行数:9,代码来源:dompdf_config.inc.php

示例5: autoload

 /**
  * Handles the dompdf autoload for the given class name 
  *
  * @param sfEvent $event
  * @access public
  * @static
  */
 public static function autoload($className)
 {
     require_once dirname(__FILE__) . '/vendor/dompdf/dompdf_config.inc.php';
     DOMPDF_autoload($className);
     return true;
 }
开发者ID:eyumay,项目名称:srms.psco,代码行数:13,代码来源:acDompdfBridge.class.php


注:本文中的DOMPDF_autoload函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。