gluu
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
oxdrp\Autoload クラス
oxdrp\Autoload 連携図
Collaboration graph

公開メンバ関数

 __construct ($path, $ns)
 
 loadClass ($name)
 
 loadFile ($filename)
 

限定公開変数類

 $path
 
 $ns
 
 $ns_sep = '\\'
 
 $suffix = '.php'
 

詳解

構築子と解体子

◆ __construct()

oxdrp\Autoload::__construct (   $path,
  $ns 
)
72  {
73  $this->path = $path;
74  $this->ns = $ns;
75  }
$ns
Definition: Autoload.php:67
$path
Definition: Autoload.php:66

関数詳解

◆ loadClass()

oxdrp\Autoload::loadClass (   $name)
78  {
79  if (strpos($name, $this->ns) !== 0) {
80  return ;
81  }
82 
83  $classname = $name;
84  $filename = $this->path
85  . DIRECTORY_SEPARATOR
86  . str_replace(
87  $this->ns_sep,
88  DIRECTORY_SEPARATOR,
89  substr($classname, strpos($classname, $this->ns_sep) + 1))
90  . $this->suffix;
91 
92  return $this->loadFile($filename);
93  }
$suffix
Definition: Autoload.php:69
loadFile($filename)
Definition: Autoload.php:95

◆ loadFile()

oxdrp\Autoload::loadFile (   $filename)
96  {
97  if (is_readable($filename)) {
98  return require_once $filename;
99  }
100  return false;
101  }

メンバ詳解

◆ $ns

oxdrp\Autoload::$ns
protected

◆ $ns_sep

oxdrp\Autoload::$ns_sep = '\\'
protected

◆ $path

oxdrp\Autoload::$path
protected

◆ $suffix

oxdrp\Autoload::$suffix = '.php'
protected

このクラス詳解は次のファイルから抽出されました: