PHP Classes

Cute PHP Link Names: Convert URL to improve its readability level

Recommend this page to a friend!
  Info   View files Documentation   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 68 All time: 10,295 This week: 455Up
Version License PHP version Categories
cutelinknames 1.0GNU General Publi...5PHP 5, Text processing
Description 

Author

This class can convert a link URL to text with a better readability level.

It is a simple class that can take a site URL and cleans it more readable.

Currently, it removes the http:// or https:// part, eliminates the www part, the slashes /, and leaves all text that may be easier to read by the users.

Innovation Award
PHP Programming Innovation award nominee
January 2022
Number 6
Some pages have URLs that are reasonably readable but use several symbols that make them harder to understand by non-technical users.

This class can take the URL of a link and processes it to remove text and symbols, so developers can use the resulting text as the anchor text of a link that is much more readable than the original URL.

Manuel Lemos
Picture of Pierre-Henry Soria
  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 46 packages by
Country: United Kingdom
Age: 33
All time rank: 37816 in United Kingdom
Week rank: 53 Up2 in United Kingdom Up
Innovation award
Innovation award
Nominee: 17x

Winner: 3x

Documentation

CuteLinkNames

A simple class that converts your URLs to link names ?

? Overview

Link Name Convertor Snippet

? Example

use PH7\Link\Name;

require_once 'vendor/autoload.php';

$url = 'http://ph7.me';
?>

<p>
<a
  href="<?= $url ?>"
  alt="<?= Name::parse($url) ?>"
>
  <!-- Ph7 -->
  <?= Name::parse($url) ?>
</a>
</p>

?? Requirements

? Installation

composer require ph-7/cute-link-names

??? Author

Hey, I'm Pierre-Henry Soria. A passionate software engineer based in Adelaide, SA, Australia ?

Pierre-Henry Soria

[![@phenrysay][twitter-image]](https://twitter.com/phenrysay) [![pH-7][github-image]](https://github.com/pH-7)

?? License

Distributed under MIT license ?

<!-- GitHub's Markdown reference links -->

[twitter-image]: https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white [github-image]: https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white


  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Image file link-name-convertor-snippet.png Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file test.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file Name.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file NameTest.php Test Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:68
This week:0
All time:10,295
This week:455Up