Skip to content

Commit

Permalink
Add app path-handling functions
Browse files Browse the repository at this point in the history
  • Loading branch information
aredridel committed Mar 22, 2012
1 parent 1fb41fb commit b1a2b4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions App.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ public function dispatch() {
}

abstract protected function route(Request $req, Response $res);

protected function subPath($path) {
return $this->basePath() .$path;
}

protected function basePath() {
return dirname($_SERVER['SCRIPT_NAME']);
}
}

0 comments on commit b1a2b4b

Please sign in to comment.