9 function __construct($dir)
11 if (!is_dir($dir)) throw new XMLException(QConst
::X_DIR_NOT_FOUND
, "'$dir' isn't a directory!");
12 if (file_exists($dir.'/.htaccess')) $htcode = file_get_contents($dir.'/.htaccess');
13 $this->code
= $htcode;
14 $this->order
= $this->get_order($htcode);
17 private function get_order($code)
19 $regexp = '/order\\s(deny|allow),\\s?(deny|allow)/i';
20 preg_match($regexp, $code, $matches);
21 array_shift($matches);
25 private function get_acces($code)
27 $regexp = '/(deny|allow)\\s+from\\s+(all|[^\\s]+)/i';
28 preg_match_all($regexp, $code, $mathes);