Merge 4.1.

This commit is contained in:
Taylor Otwell committed 2014-03-18 09:51:25 -05:00
commit 4d38281929
2 files changed
+10 -7

No files matched your search

+9 -6
View File
@@ -52,11 +52,12 @@ class HtmlBuilder {
* *
* @param string $url * @param string $url
* @param array $attributes * @param array $attributes
* @param bool $secure
* @return string * @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 '<script'.$this->attributes($attributes).'></script>'.PHP_EOL; return '<script'.$this->attributes($attributes).'></script>'.PHP_EOL;
} }
@@ -66,15 +67,16 @@ class HtmlBuilder {
* *
* @param string $url * @param string $url
* @param array $attributes * @param array $attributes
* @param bool $secure
* @return string * @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'); $defaults = array('media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet');
$attributes = $attributes + $defaults; $attributes = $attributes + $defaults;
$attributes['href'] = $this->url->asset($url); $attributes['href'] = $this->url->asset($url, $secure);
return '<link'.$this->attributes($attributes).'>'.PHP_EOL; return '<link'.$this->attributes($attributes).'>'.PHP_EOL;
} }
@@ -85,13 +87,14 @@ class HtmlBuilder {
* @param string $url * @param string $url
* @param string $alt * @param string $alt
* @param array $attributes * @param array $attributes
* @param bool $secure
* @return string * @return string
*/ */
public function image($url, $alt = null, $attributes = array()) public function image($url, $alt = null, $attributes = array(), $secure = null)
{ {
$attributes['alt'] = $alt; $attributes['alt'] = $alt;
return '<img src="'.$this->url->asset($url).'"'.$this->attributes($attributes).'>'; return '<img src="'.$this->url->asset($url, $secure).'"'.$this->attributes($attributes).'>';
} }
/** /**
+1 -1
View File
@@ -15,7 +15,7 @@
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "3.7.*" "phpunit/phpunit": "4.0.*"
}, },
"autoload": { "autoload": {
"psr-0": { "psr-0": {