本文整理匯總了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;
}