✏️ 编辑:Hdinstaller_ClassFactory.php
路径:
/virtual/bigbrother/public_html/edream-c.com/extras/installer-ftp/app/Hdinstaller_ClassFactory.php
大小:2.2 KB · 修改:2013-09-07 07:17:45 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php class Hdinstaller_ClassFactory extends Ethna_ClassFactory { /** * �w�肳�ꂽ�N���X����z�肳���t�@�C����include���� * * @access protected */ function _include($class_name) { $file = sprintf("%s.%s", $class_name, $this->controller->getExt('php')); if (file_exists_ex($file)) { include_once $file; return true; } if (preg_match('/^(\w+?)_(.*)/', $class_name, $match)) { // try ethna app style // App_Foo_Bar_Baz -> Foo/Bar/App_Foo_Bar_Baz.php $tmp = explode("_", $match[2]); $tmp[count($tmp)-1] = $class_name; $file = sprintf('%s.%s', implode(DIRECTORY_SEPARATOR, $tmp), $this->controller->getExt('php')); if (file_exists_ex($file)) { include_once $file; return true; } // try ethna app & pear mixed style // App_Foo_Bar_Baz -> Foo/Bar/Baz.php $file = sprintf('%s.%s', str_replace('_', DIRECTORY_SEPARATOR, $match[2]), $this->controller->getExt('php')); if (file_exists_ex($file)) { include_once $file; return true; } // try ethna master style // Ethna_Foo_Bar -> class/Ethna/Foo/Ethna_Foo_Bar.php array_unshift($tmp, 'Curaga', 'class'); $file = sprintf('%s.%s', implode(DIRECTORY_SEPARATOR, $tmp), $this->controller->getExt('php')); if (file_exists_ex($file)) { include_once $file; return true; } // try pear style // Foo_Bar_Baz -> Foo/Bar/Baz.php $file = sprintf('%s.%s', str_replace('_', DIRECTORY_SEPARATOR, $class_name), $this->controller->getExt('php')); if (file_exists_ex($file)) { include_once $file; return true; } } return false; } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF