Source of file HasModule.php
Size: 0,522 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/View/Helper/HasModule.php
12345678910111213141516171819202122232425262728 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\View\Helper; /** * Check to isset module * * @param string $module * * @return bool */ use Bluz\Application\Application; return function ($module = null) { $modulePath = Application::getInstance()->getPath() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $module; return file_exists($modulePath); }; |