-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Измнения в коде по соглашению в написании кода. Добавление файла comp…
…oser
- Loading branch information
1 parent
568e018
commit d51bf4a
Showing
5 changed files
with
93 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
# php-headers | ||
Компонент для работы с заголовками в PHP | ||
|
||
Компонент для раб оты с заголовками в PHP | ||
|
||
# Структура | ||
|
||
``` | ||
src/ | ||
--- interfaces/ | ||
--- Headers.php | ||
``` | ||
|
||
В директории `interfaces` хранятся необходимые интерфейсы, которые необходимо имплементировать в при реализации | ||
собственного класса `Headers`. | ||
|
||
Класс `Headers` реализует интерфейс `HeadersInterface` для управления заголовками. | ||
|
||
# Доступные методы | ||
|
||
| Метод | Аргументы | Возвращаемые данные | Исключения | Описание | | ||
|---------------------|-----------------------------|---------------------|--------------------------|-----------------------------------------------------------------------------| | ||
| set(array $params) | Заголовок(и) [key => value] | void | | Устанавливает заголовок(и) | | ||
| add(array $params) | Заголовок(и) [key => value] | void | | Добавляет заголовок. Если заголовок уже существует, то он будет перезаписан | | ||
| remove(string $key) | Заголовок | void | | Удаляет заголовок | | ||
| removeAll | | void | | Удаляет все заголовки | | ||
| has(string $key) | Заголовок | bool | | Проверяет наличие заголовка. Проверка идет на наличие ключа и значения | | ||
| get(string $key) | Заголовок | string | InvalidArgumentException | Получает значение заголовка | | ||
| getAll | | | | Получает все заголовки | | ||
|
||
# Конакты | ||
|
||
Вы можете связаться со мной в социальной сети ВКонтакте: [ВКонтакте: Максим Епихин](https://vk.com/maximepihin) | ||
|
||
Если удобно писать на почту, то можете воспользоваться этим адресом: mepihindeveloper@gmail.com | ||
|
||
Мой канал на YouTube, который посвящен разработке веб и игровых проектов: [YouTube: Максим Епихин](https://www.youtube.com/channel/UCKusRcoHUy6T4sei-rVzCqQ) | ||
|
||
Поддержать меня можно переводом на Яндекс.Деньги: [Денежный перевод](https://yoomoney.ru/to/410012382226565) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "mepihindeveloper/php-headers", | ||
"description": "Component for working with headers", | ||
"type": "library", | ||
"license": "MIT", | ||
"keywords": [ | ||
"component", | ||
"class", | ||
"php", | ||
"headers" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "mepihindeveloper", | ||
"email": "mepihindeveloper@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4|^8.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"mepihindeveloper\\components\\": "src/" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
interfaces/HeadersInterface.php → src/interfaces/HeadersInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters