public function getPath()
{
if (!$this->path) {
if (defined('PATH_APPLICATION')) {
$this->path = PATH_APPLICATION;
} else {
$reflection = new \ReflectionClass($this);
// 3 level up
$this->path = dirname(dirname(dirname($reflection->getFileName())));
}
}
return $this->path;
}