diff --git a/HtmlBuilder.php b/HtmlBuilder.php index aad9e73..057db38 100755 --- a/HtmlBuilder.php +++ b/HtmlBuilder.php @@ -68,11 +68,12 @@ class HtmlBuilder { * * @param string $url * @param array $attributes + * @param bool $secure * @return string */ - public function script($url, $attributes = array()) + public function script($url, $attributes = array(), $secure = null) { - $attributes['src'] = $this->url->asset($url); + $attributes['src'] = $this->url->asset($url, $secure); return 'attributes($attributes).'>'.PHP_EOL; } @@ -82,15 +83,16 @@ class HtmlBuilder { * * @param string $url * @param array $attributes + * @param bool $secure * @return string */ - public function style($url, $attributes = array()) + public function style($url, $attributes = array(), $secure = null) { $defaults = array('media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet'); $attributes = $attributes + $defaults; - $attributes['href'] = $this->url->asset($url); + $attributes['href'] = $this->url->asset($url, $secure); return 'attributes($attributes).'>'.PHP_EOL; } @@ -101,13 +103,14 @@ class HtmlBuilder { * @param string $url * @param string $alt * @param array $attributes + * @param bool $secure * @return string */ - public function image($url, $alt = null, $attributes = array()) + public function image($url, $alt = null, $attributes = array(), $secure = null) { $attributes['alt'] = $alt; - return 'attributes($attributes).'>'; + return 'attributes($attributes).'>'; } /**