krist4lle/lviv-it-test
最新稳定版本:1.0.0
Composer 安装命令:
composer require krist4lle/lviv-it-test
包简介
A sample package for Lviv IT.
README 文档
README
Test task for Lviv IT! Laravel package. It is Service which can get all records for the specified domain name.
What I've done
I have created a small Laravel package. I have configured composer.json file. I src folder you can find Service Provider, it binds my DNSServiceContract. DNSService can throw the Exception if function fails, if OK it returns array. Each record maps to same structure by Strategy. Each record type has its own Strategy for mapping. I have made few unit tests. I have checked data types and array keys after mapping.
Local use
To check it locally you need to have php8.1 or higher, composer.
RUN: composer install
RUN: ./vendor/bin/phpunit tests/DNSServiceTest.php
Installation
composer require krist4lle/lviv-it-test
Service will be registered in your app. Now you can inject it to any class by dependency injection.
Usage
use Krist4lle\DNSServiceContract; class YourClass { public function __construct( private readonly DNSServiceContract $DNSService ) { } public function useService() { $records = $this->DNSService->getDNSRecords('google.com'); } }
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-13