本文整理汇总了PHP中DB_DataObject::findTableFile方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_DataObject::findTableFile方法的具体用法?PHP DB_DataObject::findTableFile怎么用?PHP DB_DataObject::findTableFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_DataObject
的用法示例。
在下文中一共展示了DB_DataObject::findTableFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkIfDoExists
function checkIfDoExists($table)
{
OA_Dal::_setupDataObjectOptions();
global $_DB_DATAOBJECT;
if (!is_array($_DB_DATAOBJECT['CONFIG']['class_location'])) {
$location = $_DB_DATAOBJECT['CONFIG']['class_location'];
$fileExists = DB_DataObject::findTableFile($location, $table);
} else {
foreach ($_DB_DATAOBJECT['CONFIG']['class_location'] as $k => $location) {
$fileExists = DB_DataObject::findTableFile($location, $table);
if ($fileExists) {
break;
}
}
}
return $fileExists;
}
示例2: _autoloadClass
/**
* autoload Class
*
* @param string $class Class
* @access private
* @return string classname on Success
*/
function _autoloadClass($class)
{
global $_DB_DATAOBJECT;
if (empty($_DB_DATAOBJECT['CONFIG'])) {
DB_DataObject::_loadConfig();
}
$class_prefix = empty($_DB_DATAOBJECT['CONFIG']['class_prefix']) ? '' : $_DB_DATAOBJECT['CONFIG']['class_prefix'];
$table = substr($class, strlen($class_prefix));
// only include the file if it exists - and barf badly if it has parse errors :)
if (!empty($_DB_DATAOBJECT['CONFIG']['proxy']) || empty($_DB_DATAOBJECT['CONFIG']['class_location'])) {
return false;
}
// CHANGED FOR PLUGINS
// array of plugin class locations
// see DAL _setupDataObjectOptions
if (!is_array($_DB_DATAOBJECT['CONFIG']['class_location'])) {
$location = $_DB_DATAOBJECT['CONFIG']['class_location'];
$file = DB_DataObject::findTableFile($location, $table);
} else {
foreach ($_DB_DATAOBJECT['CONFIG']['class_location'] as $k => $location) {
$file = DB_DataObject::findTableFile($location, $table);
if ($file) {
break;
}
}
}
if (!$file) {
DB_DataObject::raiseError("autoload:Could not find class {$class} using class_location value", DB_DATAOBJECT_ERROR_INVALIDCONFIG);
return false;
}
include_once $file;
$ce = substr(phpversion(), 0, 1) > 4 ? class_exists($class, false) : class_exists($class);
if (!$ce) {
DB_DataObject::raiseError("autoload:Could not autoload {$class}", DB_DATAOBJECT_ERROR_INVALIDCONFIG);
return false;
}
return $class;
}