protected function includeFile($filename)
{
$filepath = "{$this->path}/{$filename}";
if (!$this->canReadFile($filename)) {
$msg = _elgg_services()->translator->translate('ElggPlugin:Exception:CannotIncludeFile', array($filename, $this->getID(), $this->guid, $this->path));
throw new \PluginException($msg);
}
try {
$ret = (include $filepath);
} catch (Exception $e) {
$msg = _elgg_services()->translator->translate('ElggPlugin:Exception:IncludeFileThrew', array($filename, $this->getID(), $this->guid, $this->path));
throw new \PluginException($msg, 0, $e);
}
return $ret;
}