diff --git a/HtmlBuilder.php b/HtmlBuilder.php index 3639f9a..89da5d8 100755 --- a/HtmlBuilder.php +++ b/HtmlBuilder.php @@ -52,11 +52,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; } @@ -66,15 +67,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; } @@ -85,13 +87,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).'>'; } /** diff --git a/composer.json b/composer.json index 7e5158d..a6f03dc 100755 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ }, "require-dev": { "mockery/mockery": "0.9.*", - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "4.0.*" }, "autoload": { "psr-0": {