If $name does not contain an extension at the end it is considered a directory and the default
index name is added at the end.

@param string $name Name of the page

@return string Real name of the page
343858
protected function getRealName($name)
    {
        $pattern = '/(html|htm|xhtml|php|js|css|xml|json)$/';
        if (0 === preg_match($pattern, $name)) {
            $name = preg_replace('/(\/)$/', '', $name).'/'.$this->indexName;
        }

        return $name;
    }
1323980
private function getFullQualifiedAssetName($name)
    {
        $name = $this->getUnquotedAssetName($name);

        if (strpos($name, '.') === false) {
            $name = $this->getName() . '.' . $name;
        }

        return strtolower($name);
    }
1092580
public function getFilePath($name, $extension = '.php')
    {
        $filename = trim(dotToPath($name), '/') . $extension;
        $file = null;
        foreach ($this->paths as $dir) {
            $realName = nPath($dir, $filename);
            if (file_exists($realName)) {
                $file = $realName;
                break;
            }
        }
        return $file;
    }
145315
public function getExtension($name)
    {
        if ($this->hasExtension($name)) {
            return $this->_extensions[$name];
        }

        throw new OutOfBoundsException(get_class($this).": No extension named \"$name\" found");
    }
1183264
public function getExtension(string $name)
    {
        return isset($this->extensions[$name]) ? $this->extensions[$name] : null;
    }
240973
protected function getRealChildName(string $name): string
    {
        if ($this->appliesTo($name) === true) {
            return self::getChildName($name, $this->name);
        }

        return $name;
    }
648351
protected function dir(&$name, $default='')
	{
		if (substr($name, 0, 2) == './')
		{
			$name = substr($name, 2);

			return '';
		}

		if (substr($name, 0, 1) == '/')
		{
			$name = substr($name, 1);

			return '/';
		}

		return $default;
	}
1130706
public function getLongName($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        if (isset($this->shortNames[$name])) {
            return $this->shortNames[$name];
        } else {
            return null;
        } //if
    }
1296913
protected function parseExtend($name)
    {
        $this->setExtendedClass(null);

        $nameParts = explode('@extend', $name);
        $name = trim($nameParts[0]);
        if (count($nameParts) > 1) {
            $this->setExtendedClass($nameParts[1]);
        }

        return $name;
    }
1211477
public static function convertName($name)
    {
        if (0 === strpos($name, '@') && false !== strpos($name, '/')) {
            $name = ltrim(str_replace('/', '--', $name), '@');
        }

        return $name;
    }
517859
private function getCacheFileName($name)
    {
        $name = hash($this->options['hash_type'], $name);

        if ($this->options['cache_subdir']) {
            $name = substr($name, 0, 2).DIRECTORY_SEPARATOR.substr($name, 2);
        }

        if ($this->options['prefix']) {
            $name = $this->options['prefix'].DIRECTORY_SEPARATOR.$name;
        }

        $filename = $this->options['path'].$name.'.php';
        $dir      = dirname($filename);
        if (!is_dir($dir)) {
            mkdir($dir, 0755, true);
        }

        return $filename;
    }
714739
public function parseName($name)
    {
        if(null !== $this->config->prefix)
        {
            return str_replace('@', $this->config->prefix, $name);
        }
        else
        {
            return $name;
        }
    }
588921
public function shortName($name = null)
    {
        if ($name === null) {
            return $this->_nameShort;
        }
        $this->_nameShort = $name;

        return $this;
    }
196566
public static String getFilenameExtension(String name) {
    if(name == null) {
      return null;
    }
    int index = name.lastIndexOf('.');
    return index < 0 ? null : name.substring(index + 1).toLowerCase();
  }
850351
public function getSluggedFileName($name)
    {
        $fileNameExploded = explode(".", $name);
        $extension = array_pop($fileNameExploded);
        $fileNameExploded = implode(".", $fileNameExploded);

        return $this->slugify($fileNameExploded) . "." . $extension;
    }
25962
public static function trim_extension_off($name)
    {
        if (strrpos($name, '.') !== false) {
            return substr($name, 0, strrpos($name, '.'));
        }
        
        return $name;
    }
299465
public function name($name){
        return isset($this->routes[$name]) ? $this->routes[$name] : false;
    }