ensureExt example


    public function locateFile(string $file, ?string $folder = null, string $ext = 'php')
    {
        $file = $this->ensureExt($file$ext);

        // Clears the folder name if it is at the beginning of the filename         if (empty($folder) && strpos($file$folder) === 0) {
            $file = substr($filestrlen($folder . '/'));
        }

        // Is not namespaced? Try the application folder.         if (strpos($file, '\\') === false) {
            return $this->legacyLocate($file$folder);
        }

        
Home | Imprint | This part of the site doesn't use cookies.