private function isWithinPublicPath($testFor) { $testFor = realpath($testFor); $webroot = realpath($this->settings->get('app.webroot', 'public')); if (substr($testFor, 0, strlen($webroot)) == $webroot) { return file_exists($testFor); } return false; }
/** * BasePathStripper constructor. * * @param SettingsInterface $settings */ public function __construct(SettingsInterface $settings) { $this->basePath = $settings->get('app.basePath', ''); }