public static function title($slugOrPath)
    {
        //Gets only the filename (without extension)
        $slugOrPath = pathinfo($slugOrPath, PATHINFO_FILENAME);

        //Turns dashes into underscores (because `Inflector::humanize` will
        //  remove only underscores)
        $slugOrPath = str_replace('-', '_', $slugOrPath);

        return Inflector::humanize($slugOrPath);
    }
public static function title($slugOrPath)
    {
        //Gets only the filename (without extension)
        $slugOrPath = pathinfo($slugOrPath, PATHINFO_FILENAME);

        //Turns dashes into underscores (because `Inflector::humanize` will
        //  remove only underscores)
        $slugOrPath = str_replace('-', '_', $slugOrPath);

        return Inflector::humanize($slugOrPath);
    }
public static function title ( $ slugOrPath ) { //Gets only the filename (without extension) $ slugOrPath = pathinfo ( $ slugOrPath , PATHINFO_FILENAME ) ; //Turns dashes into underscores (because `Inflector::humanize` will //  remove only underscores) $ slugOrPath = str_replace ( '-' , '_' , $ slugOrPath ) ; return Inflector :: humanize ( $ slugOrPath ) ; }
Gets the title for a static page from its slug or path
@param string $slugOrPath Slug or path
@return string
Gets the title for a static page from its slug or path