| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace ThurData\Servers\KerioEmail\Core\Hook;
- use ThurData\Servers\KerioEmail\Core\FileReader\Reader;
- use ThurData\Servers\KerioEmail\Core\ModuleConstants;
- /**
- * Description of Config
- *
- * @author Rafał Ossowski <rafal.os@thurdata.com>
- */
- class Config
- {
- /**
- * @var type
- */
- protected $data = [];
- public function __construct()
- {
- $this->data = Reader::read(ModuleConstants::getDevConfigDir() . DS . 'hooks.yml')->get('name', []);
- }
- /**
- * @param string $name
- * @return boolean
- */
- public function checkHook($name)
- {
- if (isset($this->data) && count($this->data) != 0)
- {
- return (bool) array_get($this->data, $name, true);
- }
- return true;
- }
- }
|