233:
234: $this->callback = preg_replace($val['expr'], $val['exec'], $this->url);
235: require_once($val['page']);
236: return true;
237: }
238: }
239: }
240: }
241:
242:
243: try {
244: if(!isset($pages['/404/'])){
245: throw new BaseException('404 Error unspecified!', E_USER_ERROR);;
246: }
247: } catch (BaseException $e){
248: echo $e;
249: exit;
250: }
251: $this->url = '/404/';
252: }
253: if(is_array($pages[$this->url])){
254: try {
255: if(!isset($pages[$this->url]['page'])){
256: throw new BaseException('file not set.', E_USER_ERROR);
257: }