balpom/web-link
最新稳定版本:v1.1.1
Composer 安装命令:
composer require balpom/web-link
包简介
Advanced interfaces for HTTP links and it's realisation.
README 文档
README
WebLink component extends LinkInterface and EvolvableLinkInterface from PSR-13 Link definition interfaces
This WebLink component extends PSR-13 Link definition interfaces and added to it additional methods:
interface WebLinkInterface extends LinkInterface { // Returns the HTML tag which contains the link. public function getTag(): string; // For paired tags returns the HTML content between link open and close tags. public function getContent(): string; // Returns the attribute value or null, if attribute not exist. public function getAttribute(string $attr): string|int|float|bool|array|null; }
interface EvolvableWebLinkInterface extends EvolvableLinkInterface, WebLinkInterface { // Returns an instance with the specified tag. public function withTag(string $tag): static; // Returns an instance with the specified content. public function withContent(string $content): static; }
Trivial realisation of WebLink component based on Symfony WebLink component https://github.com/symfony/web-link/
use Symfony\Component\WebLink\Link; class WebLink extends Link implements EvolvableWebLinkInterface { // ... }
License
MIT License See LICENSE.MD
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-19