get_parent_model_class(); eval("class {$owner}_{$class_name} extends {$parent_model_class}{ }"); return true; } else { throw new exception('Don\'t find model file "' . $class_name . '"'); exit; } default: if($trait) { $path = TRAIT_DIR . '/' . $owner . '/lib/' . str_replace('_', '/', $class_name) . '.php'; } elseif (defined('CUSTOM_CORE_DIR') && file_exists(CUSTOM_CORE_DIR . '/' . $owner . '/lib/' . str_replace('_', '/', $class_name) . '.php')) { $path = CUSTOM_CORE_DIR . '/' . $owner . '/lib/' . str_replace('_', '/', $class_name) . '.php'; } else { $path = APP_DIR . '/' . $owner . '/lib/' . str_replace('_', '/', $class_name) . '.php'; } if (file_exists($path)) { return require_once $path; } else { throw new exception('Don\'t find lib file "' . $class_name . '"'); return false; } } } elseif (file_exists($path = APP_DIR . '/base/lib/static/' . $class_name . '.php')) { if($trait) { $path = TRAIT_DIR . '/base/lib/static/' . $class_name . '.php'; } elseif (defined('CUSTOM_CORE_DIR') && file_exists(CUSTOM_CORE_DIR . '/base/lib/static/' . $class_name . '.php')) { $path = CUSTOM_CORE_DIR . '/base/lib/static/' . $class_name . '.php'; } return require_once $path; } else { throw new exception('Don\'t find static file "' . $class_name . '"'); return false; } }//End Function spl_autoload_register('omsAutoloader');