Source of file Style.php
Size: 0,708 Bytes - Last Modified: 2017-11-08T13:54:24+00:00
/home/travis/build/bluzphp/framework/src/View/Helper/Style.php
123456789101112131415161718192021222324252627282930313233343536 | <?php /** * Bluz Framework Component * * @copyright Bluz PHP Team * @link https://github.com/bluzphp/framework */ declare(strict_types=1); namespace Bluz\View\Helper; use Bluz\View\View; /** * Generate HTML for <style> or <link> element * * @param string $href * @param string $media * * @return string */ return function ($href, $media = 'all') { /** * @var View $this */ if (strpos($href, 'http://') !== 0 && strpos($href, 'https://') !== 0 && strpos($href, '//') !== 0 ) { $href = $this->baseUrl($href); } return "<link href=\"$href\" rel=\"stylesheet\" media=\"$media\"/>\n"; }; |