Download the PHP package tenqz/shortify without Composer
On this page you can find all versions of the php package tenqz/shortify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tenqz/shortify
More information about tenqz/shortify
Files in tenqz/shortify
Download tenqz/shortify
More information about tenqz/shortify
Files in tenqz/shortify
Vendor tenqz
Package shortify
Short Description 🚀 Lightweight PHP library to shorten URLs effortlessly. Convert long links into short, memorable ones with zero dependencies. Perfect for APIs, custom shorteners, and frameworks like Laravel/Symfony.
License MIT
Homepage https://github.com/tenqz/shortify
Package shortify
Short Description 🚀 Lightweight PHP library to shorten URLs effortlessly. Convert long links into short, memorable ones with zero dependencies. Perfect for APIs, custom shorteners, and frameworks like Laravel/Symfony.
License MIT
Homepage https://github.com/tenqz/shortify
Please rate this library. Is it a good library?
Informations about the package shortify
Shortify
🚀 Lightweight PHP 8.3+ library for URL shortening that follows SOLID and DDD principles.
Requirements
- PHP 8.3 or higher
- Composer
Installation
Features
- PHP 8.3+
- PSR-12 compliant
- SOLID/DDD: clear layer separation, ValueObject, Dependency Injection
- TDD: code covered with tests
- Minimalistic and clean code (KISS/DRY)
Usage
Basic Usage
Creating Your Own Repository
The library doesn't provide specific repository implementations, which allows you to create your own implementations for various data stores. Here's an example of a simple in-memory implementation:
Architecture
The library is built according to Domain-Driven Design (DDD) principles and is divided into the following layers:
Core (Domain)
Url.php
- URL ValueObject with validationShortener.php
- Main URL shortening logicCodeGenerator.php
- Unique code generator
Infrastructure
UrlRepositoryInterface.php
- Repository interface for URL storage
Exceptions
InvalidUrlException.php
- Exception for invalid URLsUrlNotFoundException.php
- Exception when a URL with the given code is not found
Shortify (Facade)
Shortify.php
- Facade for convenient library usage
Testing
License
MIT
All versions of shortify with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3
The package tenqz/shortify contains the following files
Loading the files please wait ....