Permalink
Browse files

Merge branch 'master' of git://github.com/zendframework/zf2

  • Loading branch information...
2 parents bebe1bf + 02d26bb commit 4dc9a11d26e3d513196b4ce95541460c38bef723 @sgehrig sgehrig committed Dec 29, 2010
@@ -961,7 +961,7 @@ public function __toString()
return '';
}
- $this->_isXhtml = $this->view->doctype()->isXhtml();
+ $this->_isXhtml = $this->view->broker('doctype')->isXhtml();
if (DojoHelper::useDeclarative()) {
if (null === $this->getDjConfigOption('parseOnLoad')) {
@@ -85,7 +85,7 @@ public function direct($name = null, $value = null, $attribs = null, array $chec
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -66,7 +66,7 @@ public function direct($name = null, $attribs = null)
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -83,7 +83,7 @@ public function direct($name = null, $value = null, $attribs = null)
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -78,7 +78,7 @@ public function direct($name = null, $value = null, $attribs = null)
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -126,7 +126,7 @@ public function direct($name = null, $value = null, $attribs = null, $options =
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -64,7 +64,7 @@ public function direct($name = '', $value = 'Reset', $attribs = null)
// get closing tag
$endTag = '>';
- if ($this->view->doctype()->isXhtml()) {
+ if ($this->view->broker('doctype')->isXhtml()) {
$endTag = ' />';
}
@@ -68,7 +68,7 @@ public function direct($name = null, $value = null, $attribs = null)
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -69,7 +69,7 @@ public function direct($name = null, $value = null, $attribs = null)
// XHTML or HTML end tag?
$endTag = ' />';
- if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->doctype()->isXhtml()) {
+ if (($this->view instanceof \Zend\View\AbstractView) && !$this->view->broker('doctype')->isXhtml()) {
$endTag= '>';
}
@@ -285,7 +285,7 @@ public function itemToString(\stdClass $item)
}
if ($this->view instanceof View\AbstractView) {
- $link .= ($this->view->doctype()->isXhtml()) ? '/>' : '>';
+ $link .= ($this->view->broker('doctype')->isXhtml()) ? '/>' : '>';
} else {
$link .= '/>';
}
@@ -200,8 +200,8 @@ protected function _isValid($item)
}
if (!isset($item->content)
- && (! $this->view->doctype()->isHtml5()
- || (! $this->view->doctype()->isHtml5() && $item->type !== 'charset'))) {
+ && (! $this->view->broker('doctype')->isHtml5()
+ || (! $this->view->broker('doctype')->isHtml5() && $item->type !== 'charset'))) {
return false;
}
@@ -326,7 +326,7 @@ public function itemToString(\stdClass $item)
$modifiersString = '';
foreach ($item->modifiers as $key => $value) {
- if ($this->view->doctype()->isHtml5()
+ if ($this->view->broker('doctype')->isHtml5()
&& $key == 'scheme') {
throw new View\Exception('Invalid modifier '
. '"scheme" provided; not supported by HTML5');
@@ -338,12 +338,12 @@ public function itemToString(\stdClass $item)
}
if ($this->view instanceof View\AbstractView) {
- if ($this->view->doctype()->isHtml5()
+ if ($this->view->broker('doctype')->isHtml5()
&& $type == 'charset') {
- $tpl = ($this->view->doctype()->isXhtml())
+ $tpl = ($this->view->broker('doctype')->isXhtml())
? '<meta %s="%s"/>'
: '<meta %s="%s">';
- } elseif ($this->view->doctype()->isXhtml()) {
+ } elseif ($this->view->broker('doctype')->isXhtml()) {
$tpl = '<meta %s="%s" content="%s" %s/>';
} else {
$tpl = '<meta %s="%s" content="%s" %s>';
@@ -72,7 +72,7 @@ public function getClosingBracket()
*/
protected function _isXhtml()
{
- $doctype = $this->view->doctype();
+ $doctype = $this->view->broker('doctype');
return $doctype->isXhtml();
}
@@ -252,7 +252,7 @@ public function testRendersAsHtmlByDefault()
public function testCanRendersAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct('foo', 'bar');
$this->assertContains(' />', $test);
}
@@ -94,7 +94,7 @@ public function testRendersAsHtmlByDefault()
public function testCanRendersAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct(array(
'name' => 'foo',
));
@@ -114,7 +114,7 @@ public function testRendersAsHtmlByDefault()
public function testCanRendersAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$options = array(
'foo' => 'Foo',
'bar' => 'Bar',
@@ -93,7 +93,7 @@ public function testShouldRenderAsHtmlByDefault()
public function testShouldAllowRenderingAsXhtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct('foo', 'bar');
$this->assertContains(' />', $test);
}
@@ -96,7 +96,7 @@ public function testShouldRenderAsHtmlByDefault()
public function testShouldAllowRenderingAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct('foo', 'bar');
$this->assertContains(' />', $test);
}
@@ -108,7 +108,7 @@ public function testRendersAsHtmlByDefault()
public function testCanRendersAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct('foo', 'bar');
$this->assertContains(' />', $test);
}
@@ -119,7 +119,7 @@ public function testRendersAsHtmlByDefault()
public function testCanRendersAsXHtml()
{
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$test = $this->helper->direct('foo', 'bar');
$this->assertContains(' />', $test);
}
@@ -350,7 +350,7 @@ public function testIndentationIsHonored()
public function testLinkRendersAsPlainHtmlIfDoctypeNotXhtml()
{
- $this->view->doctype('HTML4_STRICT');
+ $this->view->broker('doctype')->direct('HTML4_STRICT');
$this->helper->direct(array('rel' => 'icon', 'src' => '/foo/bar'))
->direct(array('rel' => 'foo', 'href' => '/bar/baz'));
$test = $this->helper->toString();
@@ -67,7 +67,7 @@ public function setUp()
}
$this->basePath = __DIR__ . '/_files/modules';
$this->view = new View\View();
- $this->view->doctype('XHTML1_STRICT');
+ $this->view->broker('doctype')->direct('XHTML1_STRICT');
$this->helper = new Helper\HeadMeta();
$this->helper->setView($this->view);
}
@@ -333,7 +333,7 @@ public function testIndentationIsHonored()
public function testStringRepresentationReflectsDoctype()
{
- $this->view->doctype('HTML4_STRICT');
+ $this->view->broker('doctype')->direct('HTML4_STRICT');
$this->helper->direct('some content', 'foo');
$test = $this->helper->toString();
$this->assertNotContains('/>', $test);
@@ -85,7 +85,7 @@ public function testMakeHtmlObjectWithAttribsWithoutParams()
public function testMakeHtmlObjectWithoutAttribsWithParamsHtml()
{
- $this->view->doctype(Helper\Doctype::HTML4_STRICT);
+ $this->view->broker('doctype')->direct(Helper\Doctype::HTML4_STRICT);
$params = array('paramname1' => 'paramvalue1',
'paramname2' => 'paramvalue2');
@@ -104,7 +104,7 @@ public function testMakeHtmlObjectWithoutAttribsWithParamsHtml()
public function testMakeHtmlObjectWithoutAttribsWithParamsXhtml()
{
- $this->view->doctype(Helper\Doctype::XHTML1_STRICT);
+ $this->view->broker('doctype')->direct(Helper\Doctype::XHTML1_STRICT);
$params = array('paramname1' => 'paramvalue1',
'paramname2' => 'paramvalue2');

0 comments on commit 4dc9a11

Please sign in to comment.