public function testMultiplePlaceholdersUseSameRegistry() { $this->assertTrue(Registry::isRegistered(PlaceholderRegistry::REGISTRY_KEY)); $registry = Registry::get(PlaceholderRegistry::REGISTRY_KEY); $this->assertSame($registry, $this->placeholder->getRegistry()); $placeholder = new Helper\Placeholder(); $this->assertSame($registry, $placeholder->getRegistry()); $this->assertSame($this->placeholder->getRegistry(), $placeholder->getRegistry()); }
public function testMultiplePlaceholdersUseSameRegistry() { $this->assertTrue(Zend_Registry::isRegistered(Zend_View_Helper_Placeholder_Registry::REGISTRY_KEY)); $registry = Zend_Registry::get(Zend_View_Helper_Placeholder_Registry::REGISTRY_KEY); $this->assertSame($registry, $this->placeholder->getRegistry()); $placeholder = new Zend_View_Helper_Placeholder(); $this->assertSame($registry, $placeholder->getRegistry()); $this->assertSame($this->placeholder->getRegistry(), $placeholder->getRegistry()); }
public function testMultiplePlaceholdersUseSameRegistry() { $placeholder = new Helper\Placeholder(); $this->assertSame($this->placeholder->getRegistry(), $placeholder->getRegistry()); }
public function getChildHtml($name = "") { $helper = new Zend_View_Helper_Placeholder(); $helper->placeholder($this->getName())->set(''); if (!empty($name)) { if (isset($this->_blocks[$name])) { $block = $this->_blocks[$name]; $helper->placeholder($this->getName())->append($block->toHtml()); } } else { $helper = new Zend_View_Helper_Placeholder(); foreach ($this->getBlocks() as $block) { $helper->placeholder($this->getName())->append($block->toHtml()); } } return $helper->getRegistry()->getContainer($this->getName()); }