MicroFrameWork/kernel/Header.php

28 lines
385 B
PHP
Raw Normal View History

2024-07-29 15:57:20 +03:00
<?php
/**
* Created by PhpStorm.
* User: kirill
* Date: 16.06.19
* Time: 0:22
*/
namespace kernel;
class Header
{
2024-07-30 12:27:44 +03:00
protected array $list = [];
2024-07-29 15:57:20 +03:00
2024-07-30 12:27:44 +03:00
public function add($key, $value): void
2024-07-29 15:57:20 +03:00
{
$this->list[$key] = $value;
}
2024-07-30 12:27:44 +03:00
public function set(): void
2024-07-29 15:57:20 +03:00
{
foreach ($this->list as $key=>$v){
header($key . ": " . $v);
}
}
}