From b10f2293d950384d912a6bfe39f2e66dfb8446b0 Mon Sep 17 00:00:00 2001 From: Christian Gahlert Date: Mon, 17 Sep 2012 19:26:09 +0200 Subject: [PATCH 01/29] Fixed wrong imports. All unit tests seem to pass. --- src/Helper/Navigation/AbstractHelper.php | 2 +- src/Helper/Navigation/HelperInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index 824bfc06..8c97074d 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -15,7 +15,7 @@ use Zend\I18n\Translator\TranslatorAwareInterface; use Zend\Navigation; use Zend\Navigation\Page\AbstractPage; -use Zend\Permissions\AclInterface; +use Zend\Permissions\Acl; use Zend\ServiceManager\ServiceLocatorAwareInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View; diff --git a/src/Helper/Navigation/HelperInterface.php b/src/Helper/Navigation/HelperInterface.php index 2c65978d..080bd675 100644 --- a/src/Helper/Navigation/HelperInterface.php +++ b/src/Helper/Navigation/HelperInterface.php @@ -12,7 +12,7 @@ use Zend\I18n\Translator\Translator; use Zend\Navigation; -use Zend\Permissions\AclInterface; +use Zend\Permissions\Acl; use Zend\View\Helper\HelperInterface as BaseHelperInterface; /** From 5fb04901e056455d02f764251263ca4054625525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Wed, 19 Sep 2012 18:20:36 +0200 Subject: [PATCH 02/29] Reorder parameters according to i18n --- src/Helper/Plural.php | 4 ++-- test/Helper/PluralTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Helper/Plural.php b/src/Helper/Plural.php index 2271324c..c6e35546 100644 --- a/src/Helper/Plural.php +++ b/src/Helper/Plural.php @@ -22,12 +22,12 @@ class Plural extends AbstractHelper { /** - * @param int $number The number that is used to decide if it's singular or plurial * @param string $singular String to use if singular * @param string $plural String to use if plural + * @param int $number The number that is used to decide if it's singular or plurial * @return string */ - public function __invoke($number, $singular, $plural) + public function __invoke($singular, $plural, $number) { if ($number > 1) { return $plural; diff --git a/test/Helper/PluralTest.php b/test/Helper/PluralTest.php index 17a2eef1..04bd1621 100644 --- a/test/Helper/PluralTest.php +++ b/test/Helper/PluralTest.php @@ -37,13 +37,13 @@ public function setUp() public function testVerifySingularString() { - $result = $this->helper->__invoke(1, 'one car', 'two cars'); + $result = $this->helper->__invoke('one car', 'two cars', 1); $this->assertEquals('one car', $result); } public function testVerifyPluralString() { - $result = $this->helper->__invoke(2, 'one car', 'two cars'); + $result = $this->helper->__invoke('one car', 'two cars', 2); $this->assertEquals('two cars', $result); } } From d445aca6badb23e3205204ca85a0fba96720cf2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Wed, 19 Sep 2012 18:22:08 +0200 Subject: [PATCH 03/29] add it to the helper plugin manager --- src/HelperPluginManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/HelperPluginManager.php b/src/HelperPluginManager.php index 517c07a3..af8fbcd5 100644 --- a/src/HelperPluginManager.php +++ b/src/HelperPluginManager.php @@ -64,6 +64,7 @@ class HelperPluginManager extends AbstractPluginManager 'partialloop' => 'Zend\View\Helper\PartialLoop', 'partial' => 'Zend\View\Helper\Partial', 'placeholder' => 'Zend\View\Helper\Placeholder', + 'plural' => 'Zend\View\Helper\Plural', 'renderchildmodel' => 'Zend\View\Helper\RenderChildModel', 'rendertoplaceholder' => 'Zend\View\Helper\RenderToPlaceholder', 'serverurl' => 'Zend\View\Helper\ServerUrl', From add0753063b1465516755fb5136e57f20749de83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Gallego?= Date: Thu, 20 Sep 2012 15:19:08 +0200 Subject: [PATCH 04/29] Updated to handle every cases --- src/Helper/Plural.php | 39 ----------------------------- src/HelperPluginManager.php | 1 - test/Helper/PluralTest.php | 49 ------------------------------------- 3 files changed, 89 deletions(-) delete mode 100644 src/Helper/Plural.php delete mode 100644 test/Helper/PluralTest.php diff --git a/src/Helper/Plural.php b/src/Helper/Plural.php deleted file mode 100644 index c6e35546..00000000 --- a/src/Helper/Plural.php +++ /dev/null @@ -1,39 +0,0 @@ - 1) { - return $plural; - } - - return $singular; - } -} - diff --git a/src/HelperPluginManager.php b/src/HelperPluginManager.php index af8fbcd5..517c07a3 100644 --- a/src/HelperPluginManager.php +++ b/src/HelperPluginManager.php @@ -64,7 +64,6 @@ class HelperPluginManager extends AbstractPluginManager 'partialloop' => 'Zend\View\Helper\PartialLoop', 'partial' => 'Zend\View\Helper\Partial', 'placeholder' => 'Zend\View\Helper\Placeholder', - 'plural' => 'Zend\View\Helper\Plural', 'renderchildmodel' => 'Zend\View\Helper\RenderChildModel', 'rendertoplaceholder' => 'Zend\View\Helper\RenderToPlaceholder', 'serverurl' => 'Zend\View\Helper\ServerUrl', diff --git a/test/Helper/PluralTest.php b/test/Helper/PluralTest.php deleted file mode 100644 index 04bd1621..00000000 --- a/test/Helper/PluralTest.php +++ /dev/null @@ -1,49 +0,0 @@ -helper = new PluralHelper(); - } - - public function testVerifySingularString() - { - $result = $this->helper->__invoke('one car', 'two cars', 1); - $this->assertEquals('one car', $result); - } - - public function testVerifyPluralString() - { - $result = $this->helper->__invoke('one car', 'two cars', 2); - $this->assertEquals('two cars', $result); - } -} From 203338a90c9405c1a27c51607bf5f61e84176641 Mon Sep 17 00:00:00 2001 From: Tim Roediger Date: Wed, 3 Oct 2012 11:29:40 +1000 Subject: [PATCH 05/29] Add view helper and controller plugin to pull the current identity from an AuthenticationService --- src/Helper/Identity.php | 65 +++++++++++++++++++ test/Helper/IdentityTest.php | 57 ++++++++++++++++ .../TestAsset/AuthenticationAdapter.php | 30 +++++++++ test/Helper/TestAsset/IdentityObject.php | 56 ++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 src/Helper/Identity.php create mode 100644 test/Helper/IdentityTest.php create mode 100644 test/Helper/TestAsset/AuthenticationAdapter.php create mode 100644 test/Helper/TestAsset/IdentityObject.php diff --git a/src/Helper/Identity.php b/src/Helper/Identity.php new file mode 100644 index 00000000..9fe59510 --- /dev/null +++ b/src/Helper/Identity.php @@ -0,0 +1,65 @@ +authenticationService; + } + + /** + * + * @param \Zend\Authentication\AuthenticationService $authetnicationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + + /** + * + * @return mixed | null + * @throws Exception\RuntimeException + */ + public function __invoke() + { + if ( ! $this->authenticationService instanceof AuthenticationService){ + throw new Exception\RuntimeException('No AuthenticationService instance provided'); + } + if ($this->authenticationService->hasIdentity()) { + return $this->authenticationService->getIdentity(); + } + return null; + } +} \ No newline at end of file diff --git a/test/Helper/IdentityTest.php b/test/Helper/IdentityTest.php new file mode 100644 index 00000000..33ff74ae --- /dev/null +++ b/test/Helper/IdentityTest.php @@ -0,0 +1,57 @@ +setUsername('a username'); + $identity->setPassword('a password'); + + + $authenticationService = new AuthenticationService(new NonPersistentStorage, new AuthenticationAdapter); + + $identityHelper = new IdentityHelper; + $identityHelper->setAuthenticationService($authenticationService); + + $this->assertNull($identityHelper()); + + $this->assertFalse($authenticationService->hasIdentity()); + + $authenticationService->getAdapter()->setIdentity($identity); + $result = $authenticationService->authenticate(); + $this->assertTrue($result->isValid()); + + $this->assertEquals($identity, $identityHelper()); + } +} diff --git a/test/Helper/TestAsset/AuthenticationAdapter.php b/test/Helper/TestAsset/AuthenticationAdapter.php new file mode 100644 index 00000000..5bb58c25 --- /dev/null +++ b/test/Helper/TestAsset/AuthenticationAdapter.php @@ -0,0 +1,30 @@ +identity = $identity; + } + + public function authenticate() + { + return new Result(Result::SUCCESS, $this->identity); + } +} diff --git a/test/Helper/TestAsset/IdentityObject.php b/test/Helper/TestAsset/IdentityObject.php new file mode 100644 index 00000000..0517fce0 --- /dev/null +++ b/test/Helper/TestAsset/IdentityObject.php @@ -0,0 +1,56 @@ +password = (string) $password; + } + + /** + * @return string|null + */ + public function getPassword() + { + return $this->password; + } + + /** + * @param string $username + */ + public function setUsername($username) + { + $this->username = (string) $username; + } + + /** + * @return string|null + */ + public function getUsername() + { + return $this->username; + } +} From fb522802bb327dcb860d872f4eba3b37f2abcf81 Mon Sep 17 00:00:00 2001 From: Tim Roediger Date: Wed, 3 Oct 2012 11:56:07 +1000 Subject: [PATCH 06/29] Fix EOF --- src/Helper/Identity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helper/Identity.php b/src/Helper/Identity.php index 9fe59510..1fb1fc30 100644 --- a/src/Helper/Identity.php +++ b/src/Helper/Identity.php @@ -62,4 +62,4 @@ public function __invoke() } return null; } -} \ No newline at end of file +} From db5d4230a83f4ce5ecdd4d94fc9dadae9a52b7cc Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 3 Oct 2012 12:42:58 -0500 Subject: [PATCH 07/29] [zendframework/zf2#2650] CS fixes - Removed unnecessary empty lines and empty docblock lines - Removed unnecessary imports (and resolved class names relative to existing imports or current namespace) - Ensured all docblocks were present - Minor flow fixes --- src/Helper/Identity.php | 24 +++++++++---------- test/Helper/IdentityTest.php | 10 ++------ .../TestAsset/AuthenticationAdapter.php | 6 ++++- test/Helper/TestAsset/IdentityObject.php | 5 ++++ 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/Helper/Identity.php b/src/Helper/Identity.php index 1fb1fc30..34dc8a23 100644 --- a/src/Helper/Identity.php +++ b/src/Helper/Identity.php @@ -22,16 +22,13 @@ */ class Identity extends AbstractHelper { - /** - * - * @var \Zend\Authentication\AuthenticationService + * @var AuthenticationService */ protected $authenticationService; /** - * - * @return \Zend\Authentication\AuthenticationService + * @return AuthenticationService */ public function getAuthenticationService() { @@ -39,8 +36,7 @@ public function getAuthenticationService() } /** - * - * @param \Zend\Authentication\AuthenticationService $authetnicationService + * @param AuthenticationService $authenticationService */ public function setAuthenticationService(AuthenticationService $authenticationService) { @@ -48,18 +44,22 @@ public function setAuthenticationService(AuthenticationService $authenticationSe } /** + * Retrieve the current identity, if any. + * + * If none available, returns null. * - * @return mixed | null + * @return mixed|null * @throws Exception\RuntimeException */ public function __invoke() { - if ( ! $this->authenticationService instanceof AuthenticationService){ + if (!$this->authenticationService instanceof AuthenticationService){ throw new Exception\RuntimeException('No AuthenticationService instance provided'); } - if ($this->authenticationService->hasIdentity()) { - return $this->authenticationService->getIdentity(); + + if (!$this->authenticationService->hasIdentity()) { + return null; } - return null; + return $this->authenticationService->getIdentity(); } } diff --git a/test/Helper/IdentityTest.php b/test/Helper/IdentityTest.php index 33ff74ae..20dd70a5 100644 --- a/test/Helper/IdentityTest.php +++ b/test/Helper/IdentityTest.php @@ -13,8 +13,6 @@ use Zend\Authentication\AuthenticationService; use Zend\Authentication\Storage\NonPersistent as NonPersistentStorage; use Zend\View\Helper\Identity as IdentityHelper; -use ZendTest\View\Helper\TestAsset\IdentityObject; -use ZendTest\View\Helper\TestAsset\AuthenticationAdapter; /** * Zend_View_Helper_IdentityTest @@ -27,19 +25,15 @@ * @group Zend_View * @group Zend_View_Helper */ - class IdentityTest extends \PHPUnit_Framework_TestCase { - public function testGetIdentity() { - - $identity = new IdentityObject(); + $identity = new TestAsset\IdentityObject(); $identity->setUsername('a username'); $identity->setPassword('a password'); - - $authenticationService = new AuthenticationService(new NonPersistentStorage, new AuthenticationAdapter); + $authenticationService = new AuthenticationService(new NonPersistentStorage, new TestAsset\AuthenticationAdapter); $identityHelper = new IdentityHelper; $identityHelper->setAuthenticationService($authenticationService); diff --git a/test/Helper/TestAsset/AuthenticationAdapter.php b/test/Helper/TestAsset/AuthenticationAdapter.php index 5bb58c25..1ed89161 100644 --- a/test/Helper/TestAsset/AuthenticationAdapter.php +++ b/test/Helper/TestAsset/AuthenticationAdapter.php @@ -13,9 +13,13 @@ use Zend\Authentication\Adapter\AdapterInterface; use Zend\Authentication\Result; +/** + * @category Zend + * @package Zend_View + * @subpackage UnitTests + */ class AuthenticationAdapter implements AdapterInterface { - protected $identity; public function setIdentity($identity) diff --git a/test/Helper/TestAsset/IdentityObject.php b/test/Helper/TestAsset/IdentityObject.php index 0517fce0..d1606901 100644 --- a/test/Helper/TestAsset/IdentityObject.php +++ b/test/Helper/TestAsset/IdentityObject.php @@ -10,6 +10,11 @@ namespace ZendTest\View\Helper\TestAsset; +/** + * @category Zend + * @package Zend_View + * @subpackage UnitTests + */ class IdentityObject { /** From a7503a6c1e6351ae7ab0a3f2f43b480cf1c47eb9 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 3 Oct 2012 12:56:23 -0500 Subject: [PATCH 08/29] [zendframework/zf2#2650] Added factories for identity plugins - In View HelperPluginManager and Mvc Controller\PluginManager - Includes tests for expected behavior --- src/HelperPluginManager.php | 11 +++++++++++ test/HelperPluginManagerTest.php | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/HelperPluginManager.php b/src/HelperPluginManager.php index 517c07a3..aee4f6ef 100644 --- a/src/HelperPluginManager.php +++ b/src/HelperPluginManager.php @@ -86,6 +86,17 @@ class HelperPluginManager extends AbstractPluginManager public function __construct(ConfigInterface $configuration = null) { parent::__construct($configuration); + + $this->setFactory('identity', function ($helpers) { + $services = $helpers->getServiceLocator(); + $helper = new Helper\Identity(); + if (!$services->has('Zend\Authentication\AuthenticationService')) { + return $helper; + } + $helper->setAuthenticationService($services->get('Zend\Authentication\AuthenticationService')); + return $helper; + }); + $this->addInitializer(array($this, 'injectRenderer')) ->addInitializer(array($this, 'injectTranslator')); } diff --git a/test/HelperPluginManagerTest.php b/test/HelperPluginManagerTest.php index fd5c8142..b47613c8 100644 --- a/test/HelperPluginManagerTest.php +++ b/test/HelperPluginManagerTest.php @@ -10,6 +10,7 @@ namespace ZendTest\View; +use Zend\ServiceManager\ServiceManager; use Zend\View\HelperPluginManager; use Zend\View\Renderer\PhpRenderer; @@ -64,4 +65,19 @@ public function testLoadingInvalidHelperRaisesException() $this->setExpectedException('Zend\View\Exception\InvalidHelperException'); $this->helpers->get('test'); } + + public function testDefinesFactoryForIdentityPlugin() + { + $this->assertTrue($this->helpers->has('identity')); + } + + public function testIdentityFactoryCanInjectAuthenticationServiceIfInParentServiceManager() + { + $services = new ServiceManager(); + $services->setInvokableClass('Zend\Authentication\AuthenticationService', 'Zend\Authentication\AuthenticationService'); + $this->helpers->setServiceLocator($services); + $identity = $this->helpers->get('identity'); + $expected = $services->get('Zend\Authentication\AuthenticationService'); + $this->assertSame($expected, $identity->getAuthenticationService()); + } } From 79be22602a34c2d9add21f51ed5a7d2012d25a1e Mon Sep 17 00:00:00 2001 From: Jerry Saravia Date: Wed, 3 Oct 2012 22:44:31 -0400 Subject: [PATCH 09/29] Added tests for set and prepend fluency. --- test/Helper/Placeholder/ContainerTest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/Helper/Placeholder/ContainerTest.php b/test/Helper/Placeholder/ContainerTest.php index e62fb9d5..7422039e 100644 --- a/test/Helper/Placeholder/ContainerTest.php +++ b/test/Helper/Placeholder/ContainerTest.php @@ -123,6 +123,26 @@ public function testSetPostfixImplementsFluentInterface() $this->assertSame($this->container, $result); } + /** + * @return void + */ + + public function testPrependImplementsFluentInterface() + { + $result = $this->container->prepend( 'test' ); + $this->assertSame($this->container, $result); + } + + /** + * @return void + */ + public function testSetImplementsFluentInterface() + { + $result = $this->container->set( 'test' ); + $this->assertSame($this->container, $result); + } + + /** * @return void */ From 126aa2216437522382378c6c9752ba75f7f78be3 Mon Sep 17 00:00:00 2001 From: Rafi Date: Fri, 19 Oct 2012 18:17:36 -0500 Subject: [PATCH 10/29] clear out child models --- src/Model/ModelInterface.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index fe359e0d..25636b4c 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -127,6 +127,13 @@ public function getChildren(); */ public function hasChildren(); + /** + * Clears out all child models + * + * @return ModelInterface + */ + public function clearChildren(); + /** * Set the name of the variable to capture this model to, if it is a child model * From 76dcbd29918b1cfed32ca62bbcbfefed70c2f281 Mon Sep 17 00:00:00 2001 From: Rafi Date: Fri, 19 Oct 2012 18:19:18 -0500 Subject: [PATCH 11/29] Implemented clearChildren() --- src/Model/ViewModel.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Model/ViewModel.php b/src/Model/ViewModel.php index c5fb3f9c..4ae50f2d 100644 --- a/src/Model/ViewModel.php +++ b/src/Model/ViewModel.php @@ -351,6 +351,17 @@ public function hasChildren() return (0 < count($this->children)); } + /** + * Clears out all child models + * + * @return ViewModel + */ + public function clearChildren() + { + $this->children = array(); + return $this; + } + /** * Set the name of the variable to capture this model to, if it is a child model * From ad7d036ec36c977619c9e5e2227d99210497935a Mon Sep 17 00:00:00 2001 From: Clemens Sahs Date: Mon, 29 Oct 2012 11:04:02 +0100 Subject: [PATCH 12/29] add a view event - add "ViewEvent::EVENT_RENDERER_POST" --- src/View.php | 3 +++ src/ViewEvent.php | 1 + 2 files changed, 4 insertions(+) diff --git a/src/View.php b/src/View.php index 65f34b84..2350b0c4 100644 --- a/src/View.php +++ b/src/View.php @@ -186,6 +186,9 @@ public function render(Model $model) )); } + $event->setRenderer($renderer); + $results = $events->trigger(ViewEvent::EVENT_RENDERER_POST, $event); + // If we have children, render them first, but only if: // a) the renderer does not implement TreeRendererInterface, or // b) it does, but canRenderTrees() returns false diff --git a/src/ViewEvent.php b/src/ViewEvent.php index b0fad47c..6fed9dc2 100644 --- a/src/ViewEvent.php +++ b/src/ViewEvent.php @@ -27,6 +27,7 @@ class ViewEvent extends Event * View events triggered by eventmanager */ const EVENT_RENDERER = 'renderer'; + const EVENT_RENDERER_POST = 'renderer.post'; const EVENT_RESPONSE = 'response'; /**#@-*/ From d6cb976bd86c662df22247941c2c22f1f09d8b49 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 13 Nov 2012 14:36:49 -0600 Subject: [PATCH 13/29] [zendframework/zf2#2812][zendframework/zf2#2528] Fix newly failing test - Test now had an expectation that was no longer necessary: that the output would continue to be captured and present. Since the PhpRenderer now catches exceptions and re-throws, the output buffering is handled slightly differently in exceptional circumstances. --- test/Helper/RenderChildModelTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Helper/RenderChildModelTest.php b/test/Helper/RenderChildModelTest.php index 36f7919b..c3d15700 100644 --- a/test/Helper/RenderChildModelTest.php +++ b/test/Helper/RenderChildModelTest.php @@ -126,7 +126,6 @@ public function testAttemptingToRenderWithNoCurrentModelRaisesException() $renderer = new PhpRenderer(); $renderer->setResolver($this->resolver); $this->setExpectedException('Zend\View\Exception\RuntimeException', 'no view model'); - $this->expectOutputString("Layout start" . PHP_EOL . PHP_EOL); $renderer->render('layout'); } } From 3717606ae9d3178548fe3e6498479b58c325bd31 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 13 Nov 2012 15:00:01 -0600 Subject: [PATCH 14/29] [zendframework/zf2#2812][zendframework/zf2#2528] Moved clearChildren into separate interface - Cannot add methods to existing interfaces; breaks BC - Created ClearableModelInterface with clearChildren(), and also added clearVariables() and clearOptions(). - ViewModel implements ModelInterface and ClearableModelInterface. - InjectViewModelListener now tests for ClearableModelInterface before attempting to clearChildren() --- src/Model/ClearableModelInterface.php | 28 +++++++++++++++++ src/Model/ModelInterface.php | 7 ----- src/Model/ViewModel.php | 26 +++++++++++++++- test/Model/ViewModelTest.php | 43 +++++++++++++++++++++++++++ 4 files changed, 96 insertions(+), 8 deletions(-) create mode 100644 src/Model/ClearableModelInterface.php diff --git a/src/Model/ClearableModelInterface.php b/src/Model/ClearableModelInterface.php new file mode 100644 index 00000000..9d88e535 --- /dev/null +++ b/src/Model/ClearableModelInterface.php @@ -0,0 +1,28 @@ +options; } + /** + * Clear any existing renderer options/hints + * + * @return ViewModel + */ + public function clearOptions() + { + $this->options = array(); + return $this; + } + /** * Get a single view variable * @@ -286,6 +297,19 @@ public function getVariables() return $this->variables; } + /** + * Clear all variables + * + * Resets the internal variable container to an empty container. + * + * @return ViewModel + */ + public function clearVariables() + { + $this->variables = new ViewVariables(); + return $this; + } + /** * Set the template to be used by this model * diff --git a/test/Model/ViewModelTest.php b/test/Model/ViewModelTest.php index fa4f2859..af62206e 100644 --- a/test/Model/ViewModelTest.php +++ b/test/Model/ViewModelTest.php @@ -24,6 +24,18 @@ */ class ViewModelTest extends TestCase { + public function testImplementsModelInterface() + { + $model = new ViewModel(); + $this->assertInstanceOf('Zend\View\Model\ModelInterface', $model); + } + + public function testImplementsClearableModelInterface() + { + $model = new ViewModel(); + $this->assertInstanceOf('Zend\View\Model\ClearableModelInterface', $model); + } + public function testAllowsEmptyConstructor() { $model = new ViewModel(); @@ -80,6 +92,7 @@ public function testSetVariablesMergesWithPreviouslyStoredVariables() $model = new ViewModel(array('foo' => 'bar', 'bar' => 'baz')); $model->setVariables(array('bar' => 'BAZBAT')); $this->assertEquals(array('foo' => 'bar', 'bar' => 'BAZBAT'), $model->getVariables()); + return $model; } public function testCanUnsetVariable() @@ -89,6 +102,16 @@ public function testCanUnsetVariable() $this->assertEquals(array(), $model->getVariables()); } + /** + * @depends testSetVariablesMergesWithPreviouslyStoredVariables + */ + public function testCanClearAllVariables(ViewModel $model) + { + $model->clearVariables(); + $vars = $model->getVariables(); + $this->assertEquals(0, count($vars)); + } + public function testCanSetOptionsSingly() { $model = new ViewModel(array(), array('foo' => 'bar')); @@ -108,6 +131,7 @@ public function testSetOptionsOverwritesAllPreviouslyStored() $model = new ViewModel(array(), array('foo' => 'bar', 'bar' => 'baz')); $model->setOptions(array('bar' => 'BAZBAT')); $this->assertEquals(array('bar' => 'BAZBAT'), $model->getOptions()); + return $model; } public function testOptionsAreInternallyConvertedToAnArrayFromTraversables() @@ -118,6 +142,15 @@ public function testOptionsAreInternallyConvertedToAnArrayFromTraversables() $this->assertEquals($options->getArrayCopy(), $model->getOptions()); } + /** + * @depends testSetOptionsOverwritesAllPreviouslyStored + */ + public function testCanClearOptions(ViewModel $model) + { + $model->clearOptions(); + $this->assertEquals(array(), $model->getOptions()); + } + public function testPassingAnInvalidArgumentToSetVariablesRaisesAnException() { $model = new ViewModel(); @@ -173,6 +206,7 @@ public function testCanCountChildren() $this->assertEquals(1, count($model)); $model->addChild($child); $this->assertEquals(2, count($model)); + return $model; } public function testCanIterateChildren() @@ -191,6 +225,15 @@ public function testCanIterateChildren() $this->assertEquals(3, $count); } + /** + * @depends testCanCountChildren + */ + public function testCanClearChildren(ViewModel $model) + { + $model->clearChildren(); + $this->assertEquals(0, count($model)); + } + public function testTemplateIsEmptyByDefault() { $model = new ViewModel(); From f56c87d523d15f93f5c5ee0dfbfa6349fa1ed0f2 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 13 Nov 2012 17:02:33 -0600 Subject: [PATCH 15/29] [zendframework/zf2#2855] Added test for renderer.post event - Added a test for the renderer.post event to ensure it gets triggered --- test/ViewTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/ViewTest.php b/test/ViewTest.php index 5139f733..2baa1ec4 100644 --- a/test/ViewTest.php +++ b/test/ViewTest.php @@ -290,4 +290,20 @@ public function testUsesTreeRendererInterfaceToDetermineWhetherOrNotToPassOnlyRo $this->assertEquals($expected, $result->content); } + + public function testCanTriggerPostRendererEvent() + { + $this->attachTestStrategies(); + $test = (object) array('flag' => false); + $this->view->getEventManager()->attach('renderer.post', function ($e) use ($test) { + $test->flag = true; + }); + $variables = array( + 'foo' => 'bar', + 'bar' => 'baz', + ); + $this->model->setVariables($variables); + $this->view->render($this->model); + $this->assertTrue($test->flag); + } } From f3cd314e1eb8246991501d7813ac12de5284b14b Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 18 Jan 2013 15:40:16 -0600 Subject: [PATCH 16/29] Incorporate feedbac - Added getter for charset - For selected multibyte character sets, an additional content-transfer-encoding header is set with the value 'BINARY' --- src/Strategy/JsonStrategy.php | 24 +++++++++++++++++++ test/Strategy/JsonStrategyTest.php | 37 ++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/src/Strategy/JsonStrategy.php b/src/Strategy/JsonStrategy.php index 76747ac8..097738b9 100644 --- a/src/Strategy/JsonStrategy.php +++ b/src/Strategy/JsonStrategy.php @@ -36,6 +36,16 @@ class JsonStrategy implements ListenerAggregateInterface */ protected $listeners = array(); + /** + * Multibyte character sets that will trigger a binary content-transfer-encoding + * + * @var array + */ + protected $multibyteCharsets = array( + 'UTF-16', + 'UTF-32', + ); + /** * @var JsonRenderer */ @@ -91,6 +101,16 @@ public function setCharset($charset) return $this; } + /** + * Retrieve the current character set + * + * @return string + */ + public function getCharset() + { + return $this->charset; + } + /** * Detect if we should use the JsonRenderer based on model type and/or * Accept header @@ -144,5 +164,9 @@ public function injectResponse(ViewEvent $e) $contentType .= '; charset=' . $this->charset; $headers->addHeaderLine('content-type', $contentType); + + if (in_array(strtoupper($this->charset), $this->multibyteCharsets)) { + $headers->addHeaderLine('content-transfer-encoding', 'BINARY'); + } } } diff --git a/test/Strategy/JsonStrategyTest.php b/test/Strategy/JsonStrategyTest.php index af0db45b..1ac73601 100644 --- a/test/Strategy/JsonStrategyTest.php +++ b/test/Strategy/JsonStrategyTest.php @@ -288,4 +288,41 @@ public function testUsesProvidedCharsetWhenCreatingJsonHeader() $this->assertTrue($headers->has('content-type')); $this->assertContains('application/json; charset=utf-16', $headers->get('content-type')->getFieldValue()); } + + public function testCharsetIsUtf8ByDefault() + { + $this->assertEquals('utf-8', $this->strategy->getCharset()); + } + + public function testCharsetIsMutable() + { + $this->strategy->setCharset('iso-8859-1'); + $this->assertEquals('iso-8859-1', $this->strategy->getCharset()); + } + + public function multibyteCharsets() + { + return array( + 'utf-16' => array('utf-16'), + 'utf-32' => array('utf-32'), + ); + } + + /** + * @dataProvider multibyteCharsets + */ + public function testContentTransferEncodingHeaderSetToBinaryForSpecificMultibyteCharsets($charset) + { + $this->strategy->setCharset($charset); + + $this->event->setResponse($this->response); + $this->event->setRenderer($this->renderer); + $this->event->setResult(json_encode(array('foo' => 'bar'))); + + $this->strategy->injectResponse($this->event); + $content = $this->response->getContent(); + $headers = $this->response->getHeaders(); + $this->assertTrue($headers->has('content-transfer-encoding')); + $this->assertEquals('BINARY', $headers->get('content-transfer-encoding')->getFieldValue()); + } } From 45429b5e46fc7d3a31f367187f0f11d097852d87 Mon Sep 17 00:00:00 2001 From: blanchonvincent Date: Mon, 21 Jan 2013 12:42:21 +0100 Subject: [PATCH 17/29] Fix namespace constant name --- src/Helper/FlashMessenger.php | 10 +++++----- test/Helper/FlashMessengerTest.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Helper/FlashMessenger.php b/src/Helper/FlashMessenger.php index 5399567a..56de2a65 100644 --- a/src/Helper/FlashMessenger.php +++ b/src/Helper/FlashMessenger.php @@ -50,10 +50,10 @@ class FlashMessenger extends AbstractHelper implements ServiceLocatorAwareInterf * @var array Default attributes for the open format tag */ protected $classMessages = array( - PluginFlashMessenger::INFO_MESSAGE => 'info', - PluginFlashMessenger::ERROR_MESSAGE => 'error', - PluginFlashMessenger::SUCCESS_MESSAGE => 'success', - PluginFlashMessenger::DEFAULT_MESSAGE => 'default', + PluginFlashMessenger::NAMESPACE_INFO => 'info', + PluginFlashMessenger::NAMESPACE_ERROR => 'error', + PluginFlashMessenger::NAMESPACE_SUCCESS => 'success', + PluginFlashMessenger::NAMESPACE_DEFAULT => 'default', ); /** @@ -98,7 +98,7 @@ public function render($namespace = null, array $classes = array()) // Prepare classes for opening tag if (empty($classes)) { $classes = isset($this->classMessages[$namespace]) ? - $this->classMessages[$namespace] : $this->classMessages[PluginFlashMessenger::DEFAULT_MESSAGE]; + $this->classMessages[$namespace] : $this->classMessages[PluginFlashMessenger::NAMESPACE_DEFAULT]; $classes = array($classes); } diff --git a/test/Helper/FlashMessengerTest.php b/test/Helper/FlashMessengerTest.php index bcb1844d..6a6a9be1 100644 --- a/test/Helper/FlashMessengerTest.php +++ b/test/Helper/FlashMessengerTest.php @@ -106,13 +106,13 @@ public function testCanProxyAndRetrieveMessagesFromPluginController() public function testCanDisplayListOfMessages() { $displayInfoAssertion = ''; - $displayInfo = $this->helper->render(PluginFlashMessenger::INFO_MESSAGE); + $displayInfo = $this->helper->render(PluginFlashMessenger::NAMESPACE_INFO); $this->assertEquals($displayInfoAssertion, $displayInfo); $this->seedMessages(); $displayInfoAssertion = '
  • bar-info
'; - $displayInfo = $this->helper->render(PluginFlashMessenger::INFO_MESSAGE); + $displayInfo = $this->helper->render(PluginFlashMessenger::NAMESPACE_INFO); $this->assertEquals($displayInfoAssertion, $displayInfo); } @@ -122,7 +122,7 @@ public function testCanDisplayListOfMessagesByInvoke() $this->seedMessages(); $displayInfoAssertion = '
  • bar-info
'; - $displayInfo = $helper()->render(PluginFlashMessenger::INFO_MESSAGE); + $displayInfo = $helper()->render(PluginFlashMessenger::NAMESPACE_INFO); $this->assertEquals($displayInfoAssertion, $displayInfo); } @@ -135,7 +135,7 @@ public function testCanDisplayListOfMessagesCustomised() ->setMessageOpenFormat('

') ->setMessageSeparatorString('

') ->setMessageCloseString('

') - ->render(PluginFlashMessenger::INFO_MESSAGE, array('foo-baz', 'foo-bar')); + ->render(PluginFlashMessenger::NAMESPACE_INFO, array('foo-baz', 'foo-bar')); $this->assertEquals($displayInfoAssertion, $displayInfo); } @@ -170,7 +170,7 @@ public function testCanDisplayListOfMessagesCustomisedByConfig() $helper = $helperPluginManager->get('flashmessenger'); $displayInfoAssertion = '
  • bar-info
'; - $displayInfo = $helper->render(PluginFlashMessenger::INFO_MESSAGE); + $displayInfo = $helper->render(PluginFlashMessenger::NAMESPACE_INFO); $this->assertEquals($displayInfoAssertion, $displayInfo); } } From 6c9a292ee87c6cbfe55c3f3f4a27c3862e354107 Mon Sep 17 00:00:00 2001 From: blanchonvincent Date: Mon, 21 Jan 2013 21:56:43 +0100 Subject: [PATCH 18/29] Fix special key "view_helper_config" --- src/Helper/Service/FlashMessengerFactory.php | 4 ++-- test/Helper/FlashMessengerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Helper/Service/FlashMessengerFactory.php b/src/Helper/Service/FlashMessengerFactory.php index b9e10bd5..925fb67e 100644 --- a/src/Helper/Service/FlashMessengerFactory.php +++ b/src/Helper/Service/FlashMessengerFactory.php @@ -29,8 +29,8 @@ public function createService(ServiceLocatorInterface $serviceLocator) $flashMessenger = $controllerPluginManager->get('flashmessenger'); $helper->setPluginFlashMessenger($flashMessenger); $config = $serviceLocator->get('Config'); - if (isset($config['view_helper']['flashmessenger'])) { - $configHelper = $config['view_helper']['flashmessenger']; + if (isset($config['view_helper_config']['flashmessenger'])) { + $configHelper = $config['view_helper_config']['flashmessenger']; if (isset($configHelper['message_open_format'])) { $helper->setMessageOpenFormat($configHelper['message_open_format']); } diff --git a/test/Helper/FlashMessengerTest.php b/test/Helper/FlashMessengerTest.php index 6a6a9be1..80fc36c1 100644 --- a/test/Helper/FlashMessengerTest.php +++ b/test/Helper/FlashMessengerTest.php @@ -144,7 +144,7 @@ public function testCanDisplayListOfMessagesCustomisedByConfig() $this->seedMessages(); $config = array( - 'view_helper' => array( + 'view_helper_config' => array( 'flashmessenger' => array( 'message_open_format' => '
  • ', 'message_separator_string' => '
  • ', From 1d5094edaef215b4de0376b8f2ea583b908a48e8 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 21 Jan 2013 15:01:17 -0600 Subject: [PATCH 19/29] [zendframework/zf2#3502] Point flashmessenger to factory class, not implementing class --- src/HelperPluginManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HelperPluginManager.php b/src/HelperPluginManager.php index 423e77a4..80ff9faf 100644 --- a/src/HelperPluginManager.php +++ b/src/HelperPluginManager.php @@ -32,7 +32,7 @@ class HelperPluginManager extends AbstractPluginManager * @var array */ protected $factories = array( - 'flashmessenger' => 'Zend\View\Helper\FlashMessenger', + 'flashmessenger' => 'Zend\View\Helper\Service\FlashMessengerFactory', ); /** From 77251428e2cd501c8ca87f0b7ec88f7d5369e0b3 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 21 Jan 2013 16:14:27 -0600 Subject: [PATCH 20/29] Removed all @category, @package, and @subpackage annotations - Per zendframework/zf2#2743, and following on zendframework/zf2#2953 and discussion on the ML - Also removes empty docblocks, and empty lines at the end of docblocks - Library only; phpdoc is never run on tests anyways, and did not want to potentially create breakage due to test expectations that relied on annotations. At this time, all tests pass. --- src/Exception/BadMethodCallException.php | 4 ---- src/Exception/DomainException.php | 4 ---- src/Exception/ExceptionInterface.php | 5 ----- src/Exception/InvalidArgumentException.php | 4 ---- src/Exception/InvalidHelperException.php | 4 ---- src/Exception/RuntimeException.php | 4 ---- src/Helper/AbstractHelper.php | 6 ------ src/Helper/AbstractHtmlElement.php | 6 ------ src/Helper/BasePath.php | 4 ---- src/Helper/Cycle.php | 4 ---- src/Helper/DeclareVars.php | 4 ---- src/Helper/Doctype.php | 4 ---- src/Helper/EscapeCss.php | 4 ---- src/Helper/EscapeHtml.php | 4 ---- src/Helper/EscapeHtmlAttr.php | 4 ---- src/Helper/EscapeJs.php | 4 ---- src/Helper/EscapeUrl.php | 4 ---- src/Helper/Escaper/AbstractHelper.php | 4 ---- src/Helper/FlashMessenger.php | 4 ---- src/Helper/Gravatar.php | 4 ---- src/Helper/HeadLink.php | 3 --- src/Helper/HeadMeta.php | 3 --- src/Helper/HeadScript.php | 4 ---- src/Helper/HeadStyle.php | 4 ---- src/Helper/HeadTitle.php | 4 ---- src/Helper/HelperInterface.php | 6 ------ src/Helper/HtmlFlash.php | 6 ------ src/Helper/HtmlList.php | 5 ----- src/Helper/HtmlObject.php | 6 ------ src/Helper/HtmlPage.php | 6 ------ src/Helper/HtmlQuicktime.php | 6 ------ src/Helper/Identity.php | 5 ----- src/Helper/InlineScript.php | 4 ---- src/Helper/Json.php | 4 ---- src/Helper/Layout.php | 4 ---- src/Helper/Navigation.php | 5 ----- src/Helper/Navigation/AbstractHelper.php | 5 ----- src/Helper/Navigation/Breadcrumbs.php | 5 ----- src/Helper/Navigation/HelperInterface.php | 5 ----- src/Helper/Navigation/Links.php | 5 ----- src/Helper/Navigation/Menu.php | 5 ----- src/Helper/Navigation/PluginManager.php | 5 ----- src/Helper/Navigation/Sitemap.php | 5 ----- src/Helper/PaginationControl.php | 5 ----- src/Helper/Partial.php | 4 ---- src/Helper/PartialLoop.php | 4 ---- src/Helper/Placeholder.php | 4 ---- src/Helper/Placeholder/Container.php | 4 ---- src/Helper/Placeholder/Container/AbstractContainer.php | 4 ---- src/Helper/Placeholder/Container/AbstractStandalone.php | 4 ---- src/Helper/Placeholder/Registry.php | 4 ---- src/Helper/RenderChildModel.php | 4 ---- src/Helper/RenderToPlaceholder.php | 4 ---- src/Helper/ServerUrl.php | 5 ----- src/Helper/Service/FlashMessengerFactory.php | 6 ------ src/Helper/Url.php | 4 ---- src/Helper/ViewModel.php | 4 ---- src/HelperPluginManager.php | 4 ---- src/Model/ClearableModelInterface.php | 5 ----- src/Model/ConsoleModel.php | 6 ------ src/Model/FeedModel.php | 5 ----- src/Model/JsonModel.php | 6 ------ src/Model/ModelInterface.php | 5 ----- src/Model/ViewModel.php | 6 ------ src/Renderer/ConsoleRenderer.php | 4 ---- src/Renderer/FeedRenderer.php | 5 ----- src/Renderer/JsonRenderer.php | 5 ----- src/Renderer/PhpRenderer.php | 4 ---- src/Renderer/RendererInterface.php | 4 ---- src/Renderer/TreeRendererInterface.php | 6 ------ src/Resolver/AggregateResolver.php | 6 ------ src/Resolver/ResolverInterface.php | 6 ------ src/Resolver/TemplateMapResolver.php | 6 ------ src/Resolver/TemplatePathStack.php | 5 ----- src/Strategy/FeedStrategy.php | 6 ------ src/Strategy/JsonStrategy.php | 6 ------ src/Strategy/PhpRendererStrategy.php | 6 ------ src/Stream.php | 4 ---- src/Variables.php | 3 --- src/View.php | 5 ----- src/ViewEvent.php | 5 ----- 81 files changed, 378 deletions(-) diff --git a/src/Exception/BadMethodCallException.php b/src/Exception/BadMethodCallException.php index b04596f8..af309aaa 100644 --- a/src/Exception/BadMethodCallException.php +++ b/src/Exception/BadMethodCallException.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Bad method call exception - * - * @category Zend - * @package Zend_View */ class BadMethodCallException extends \BadMethodCallException diff --git a/src/Exception/DomainException.php b/src/Exception/DomainException.php index 0e723106..e52fc739 100644 --- a/src/Exception/DomainException.php +++ b/src/Exception/DomainException.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Domain exception - * - * @category Zend - * @package Zend_View */ class DomainException extends \DomainException diff --git a/src/Exception/ExceptionInterface.php b/src/Exception/ExceptionInterface.php index e7d18295..753e6a02 100644 --- a/src/Exception/ExceptionInterface.php +++ b/src/Exception/ExceptionInterface.php @@ -5,14 +5,9 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; -/** - * @category Zend - * @package Zend_View - */ interface ExceptionInterface {} diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 82b4eab4..8acb6439 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_View */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/src/Exception/InvalidHelperException.php b/src/Exception/InvalidHelperException.php index a87a49de..7926eac9 100644 --- a/src/Exception/InvalidHelperException.php +++ b/src/Exception/InvalidHelperException.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Invalid helper exception - * - * @category Zend - * @package Zend_View */ class InvalidHelperException extends \Exception diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index 8db91d3b..fc50ac03 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Runtime exception - * - * @category Zend - * @package Zend_View */ class RuntimeException extends \RuntimeException diff --git a/src/Helper/AbstractHelper.php b/src/Helper/AbstractHelper.php index 88cc308c..8234a8a6 100644 --- a/src/Helper/AbstractHelper.php +++ b/src/Helper/AbstractHelper.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -13,11 +12,6 @@ use Zend\View\Helper\HelperInterface; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ abstract class AbstractHelper implements HelperInterface { /** diff --git a/src/Helper/AbstractHtmlElement.php b/src/Helper/AbstractHtmlElement.php index 3274cf14..03707411 100644 --- a/src/Helper/AbstractHtmlElement.php +++ b/src/Helper/AbstractHtmlElement.php @@ -5,16 +5,10 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ abstract class AbstractHtmlElement extends AbstractHelper { /** diff --git a/src/Helper/BasePath.php b/src/Helper/BasePath.php index fb6ddd80..dc1b2d48 100644 --- a/src/Helper/BasePath.php +++ b/src/Helper/BasePath.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for retrieving the base path. - * - * @package Zend_View - * @subpackage Helper */ class BasePath extends AbstractHelper { diff --git a/src/Helper/Cycle.php b/src/Helper/Cycle.php index 3da7022d..60a296d4 100644 --- a/src/Helper/Cycle.php +++ b/src/Helper/Cycle.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for alternating between set of values - * - * @package Zend_View - * @subpackage Helper */ class Cycle extends AbstractHelper implements \Iterator { diff --git a/src/Helper/DeclareVars.php b/src/Helper/DeclareVars.php index e6c9d2c7..d2dde4bc 100644 --- a/src/Helper/DeclareVars.php +++ b/src/Helper/DeclareVars.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for declaring default values of template variables - * - * @package Zend_View - * @subpackage Helper */ class DeclareVars extends AbstractHelper { diff --git a/src/Helper/Doctype.php b/src/Helper/Doctype.php index 7f10b266..ed3d5e72 100644 --- a/src/Helper/Doctype.php +++ b/src/Helper/Doctype.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ /** * Helper for setting and retrieving the doctype - * - * @package Zend_View - * @subpackage Helper */ class Doctype extends AbstractHelper { diff --git a/src/Helper/EscapeCss.php b/src/Helper/EscapeCss.php index fe4797e2..c156629c 100644 --- a/src/Helper/EscapeCss.php +++ b/src/Helper/EscapeCss.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeCss extends Escaper\AbstractHelper { diff --git a/src/Helper/EscapeHtml.php b/src/Helper/EscapeHtml.php index 3149afdf..c2ebfd02 100644 --- a/src/Helper/EscapeHtml.php +++ b/src/Helper/EscapeHtml.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeHtml extends Escaper\AbstractHelper { diff --git a/src/Helper/EscapeHtmlAttr.php b/src/Helper/EscapeHtmlAttr.php index 237bfd75..0fba7cd6 100644 --- a/src/Helper/EscapeHtmlAttr.php +++ b/src/Helper/EscapeHtmlAttr.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeHtmlAttr extends Escaper\AbstractHelper { diff --git a/src/Helper/EscapeJs.php b/src/Helper/EscapeJs.php index ec99b2e3..c324c7c8 100644 --- a/src/Helper/EscapeJs.php +++ b/src/Helper/EscapeJs.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeJs extends Escaper\AbstractHelper { diff --git a/src/Helper/EscapeUrl.php b/src/Helper/EscapeUrl.php index 749a36b6..67ea5a7b 100644 --- a/src/Helper/EscapeUrl.php +++ b/src/Helper/EscapeUrl.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeUrl extends Escaper\AbstractHelper { diff --git a/src/Helper/Escaper/AbstractHelper.php b/src/Helper/Escaper/AbstractHelper.php index ca9d1ae0..969b9ace 100644 --- a/src/Helper/Escaper/AbstractHelper.php +++ b/src/Helper/Escaper/AbstractHelper.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Escaper; @@ -16,9 +15,6 @@ /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractHelper extends Helper\AbstractHelper { diff --git a/src/Helper/FlashMessenger.php b/src/Helper/FlashMessenger.php index 56de2a65..d06cce9a 100644 --- a/src/Helper/FlashMessenger.php +++ b/src/Helper/FlashMessenger.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,9 +17,6 @@ /** * Helper to proxy the plugin flash messenger - * - * @package Zend_View - * @subpackage Helper */ class FlashMessenger extends AbstractHelper implements ServiceLocatorAwareInterface { diff --git a/src/Helper/Gravatar.php b/src/Helper/Gravatar.php index 7e84df6f..7c1202bc 100644 --- a/src/Helper/Gravatar.php +++ b/src/Helper/Gravatar.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for retrieving avatars from gravatar.com - * - * @package Zend\View - * @subpackage Helper */ class Gravatar extends AbstractHtmlElement { diff --git a/src/Helper/HeadLink.php b/src/Helper/HeadLink.php index 95cb8b42..6d9723cc 100644 --- a/src/Helper/HeadLink.php +++ b/src/Helper/HeadLink.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,8 +17,6 @@ * Zend_Layout_View_Helper_HeadLink * * @see http://www.w3.org/TR/xhtml1/dtds.html - * @package Zend_View - * @subpackage Helper */ class HeadLink extends Placeholder\Container\AbstractStandalone { diff --git a/src/Helper/HeadMeta.php b/src/Helper/HeadMeta.php index 4ef4ad7d..ed0e1f4f 100644 --- a/src/Helper/HeadMeta.php +++ b/src/Helper/HeadMeta.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,8 +17,6 @@ * Zend_Layout_View_Helper_HeadMeta * * @see http://www.w3.org/TR/xhtml1/dtds.html - * @package Zend_View - * @subpackage Helper */ class HeadMeta extends Placeholder\Container\AbstractStandalone { diff --git a/src/Helper/HeadScript.php b/src/Helper/HeadScript.php index 77a3c52a..fe6372ac 100644 --- a/src/Helper/HeadScript.php +++ b/src/Helper/HeadScript.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ /** * Helper for setting and retrieving script elements for HTML head section - * - * @package Zend_View - * @subpackage Helper */ class HeadScript extends Placeholder\Container\AbstractStandalone { diff --git a/src/Helper/HeadStyle.php b/src/Helper/HeadStyle.php index 1739180f..3835e41e 100644 --- a/src/Helper/HeadStyle.php +++ b/src/Helper/HeadStyle.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ /** * Helper for setting and retrieving stylesheets - * - * @package Zend_View - * @subpackage Helper */ class HeadStyle extends Placeholder\Container\AbstractStandalone { diff --git a/src/Helper/HeadTitle.php b/src/Helper/HeadTitle.php index 92ea8e54..0ee0bdd7 100644 --- a/src/Helper/HeadTitle.php +++ b/src/Helper/HeadTitle.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ /** * Helper for setting and retrieving title element for HTML head - * - * @package Zend_View - * @subpackage Helper */ class HeadTitle extends Placeholder\Container\AbstractStandalone implements TranslatorAwareInterface diff --git a/src/Helper/HelperInterface.php b/src/Helper/HelperInterface.php index 67e7fefa..f2106dc1 100644 --- a/src/Helper/HelperInterface.php +++ b/src/Helper/HelperInterface.php @@ -5,18 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ interface HelperInterface { /** diff --git a/src/Helper/HtmlFlash.php b/src/Helper/HtmlFlash.php index 163aff72..9728b7f0 100644 --- a/src/Helper/HtmlFlash.php +++ b/src/Helper/HtmlFlash.php @@ -5,16 +5,10 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlFlash extends AbstractHtmlElement { /** diff --git a/src/Helper/HtmlList.php b/src/Helper/HtmlList.php index f50bf313..e04e3626 100644 --- a/src/Helper/HtmlList.php +++ b/src/Helper/HtmlList.php @@ -5,17 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for ordered and unordered lists - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class HtmlList extends AbstractHtmlElement { diff --git a/src/Helper/HtmlObject.php b/src/Helper/HtmlObject.php index a3d91cb0..a28d14a5 100644 --- a/src/Helper/HtmlObject.php +++ b/src/Helper/HtmlObject.php @@ -5,18 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; use Zend\View\Exception\InvalidArgumentException; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlObject extends AbstractHtmlElement { /** diff --git a/src/Helper/HtmlPage.php b/src/Helper/HtmlPage.php index bb0ebfed..05ac2386 100644 --- a/src/Helper/HtmlPage.php +++ b/src/Helper/HtmlPage.php @@ -5,16 +5,10 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlPage extends AbstractHtmlElement { /** diff --git a/src/Helper/HtmlQuicktime.php b/src/Helper/HtmlQuicktime.php index 3907503c..852b3f3f 100644 --- a/src/Helper/HtmlQuicktime.php +++ b/src/Helper/HtmlQuicktime.php @@ -5,16 +5,10 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlQuicktime extends AbstractHtmlElement { /** diff --git a/src/Helper/Identity.php b/src/Helper/Identity.php index 34dc8a23..f6d847bb 100644 --- a/src/Helper/Identity.php +++ b/src/Helper/Identity.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,10 +14,6 @@ /** * View helper plugin to fetch the authenticated identity. - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Identity extends AbstractHelper { diff --git a/src/Helper/InlineScript.php b/src/Helper/InlineScript.php index 2caf2118..009d501d 100644 --- a/src/Helper/InlineScript.php +++ b/src/Helper/InlineScript.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -13,9 +12,6 @@ /** * Helper for setting and retrieving script elements for inclusion in HTML body * section - * - * @package Zend_View - * @subpackage Helper */ class InlineScript extends HeadScript { diff --git a/src/Helper/Json.php b/src/Helper/Json.php index a3628519..db8572a9 100644 --- a/src/Helper/Json.php +++ b/src/Helper/Json.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ /** * Helper for simplifying JSON responses - * - * @package Zend_View - * @subpackage Helper */ class Json extends AbstractHelper { diff --git a/src/Helper/Layout.php b/src/Helper/Layout.php index a9c1e063..91f8e55b 100644 --- a/src/Helper/Layout.php +++ b/src/Helper/Layout.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ /** * View helper for retrieving layout object - * - * @package Zend_View - * @subpackage Helper */ class Layout extends AbstractHelper { diff --git a/src/Helper/Navigation.php b/src/Helper/Navigation.php index f0f7539c..f77caffc 100644 --- a/src/Helper/Navigation.php +++ b/src/Helper/Navigation.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,10 +17,6 @@ /** * Proxy helper for retrieving navigational helpers and forwarding calls - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Navigation extends AbstractNavigationHelper { diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index 8a798b82..e5700777 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -23,10 +22,6 @@ /** * Base class for navigational helpers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements HelperInterface, diff --git a/src/Helper/Navigation/Breadcrumbs.php b/src/Helper/Navigation/Breadcrumbs.php index 2bf4365e..e6ad13d7 100644 --- a/src/Helper/Navigation/Breadcrumbs.php +++ b/src/Helper/Navigation/Breadcrumbs.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -17,10 +16,6 @@ /** * Helper for printing breadcrumbs - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Breadcrumbs extends AbstractHelper { diff --git a/src/Helper/Navigation/HelperInterface.php b/src/Helper/Navigation/HelperInterface.php index b409d94f..6c607c88 100644 --- a/src/Helper/Navigation/HelperInterface.php +++ b/src/Helper/Navigation/HelperInterface.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -16,10 +15,6 @@ /** * Interface for navigational helpers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ interface HelperInterface extends BaseHelperInterface { diff --git a/src/Helper/Navigation/Links.php b/src/Helper/Navigation/Links.php index 616ac173..3e70fa4c 100644 --- a/src/Helper/Navigation/Links.php +++ b/src/Helper/Navigation/Links.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -21,10 +20,6 @@ /** * Helper for printing elements - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Links extends AbstractHelper { diff --git a/src/Helper/Navigation/Menu.php b/src/Helper/Navigation/Menu.php index 5d6e00c6..e56864ad 100644 --- a/src/Helper/Navigation/Menu.php +++ b/src/Helper/Navigation/Menu.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -18,10 +17,6 @@ /** * Helper for rendering menus from navigation containers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Menu extends AbstractHelper { diff --git a/src/Helper/Navigation/PluginManager.php b/src/Helper/Navigation/PluginManager.php index 3c4c4e71..29ec3329 100644 --- a/src/Helper/Navigation/PluginManager.php +++ b/src/Helper/Navigation/PluginManager.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -19,10 +18,6 @@ * Enforces that helpers retrieved are instances of * Navigation\HelperInterface. Additionally, it registers a number of default * helpers. - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class PluginManager extends HelperPluginManager { diff --git a/src/Helper/Navigation/Sitemap.php b/src/Helper/Navigation/Sitemap.php index 45b8941a..32166e3e 100644 --- a/src/Helper/Navigation/Sitemap.php +++ b/src/Helper/Navigation/Sitemap.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -23,10 +22,6 @@ * Helper for printing sitemaps * * @link http://www.sitemaps.org/protocol.php - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Sitemap extends AbstractHelper { diff --git a/src/Helper/PaginationControl.php b/src/Helper/PaginationControl.php index 63b44c63..b4948a10 100644 --- a/src/Helper/PaginationControl.php +++ b/src/Helper/PaginationControl.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,10 +13,6 @@ use Zend\View; use Zend\View\Exception; -/** - * @category Zend - * @package Zend_View - */ class PaginationControl extends AbstractHelper { /** diff --git a/src/Helper/Partial.php b/src/Helper/Partial.php index 264d8f3c..cb2d933a 100644 --- a/src/Helper/Partial.php +++ b/src/Helper/Partial.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ /** * Helper for rendering a template fragment in its own variable scope. - * - * @package Zend_View - * @subpackage Helper */ class Partial extends AbstractHelper { diff --git a/src/Helper/PartialLoop.php b/src/Helper/PartialLoop.php index 6daf303b..51da72b5 100644 --- a/src/Helper/PartialLoop.php +++ b/src/Helper/PartialLoop.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,9 +17,6 @@ /** * Helper for rendering a template fragment in its own variable scope; iterates * over data provided and renders for each iteration. - * - * @package Zend_View - * @subpackage Helper */ class PartialLoop extends Partial { diff --git a/src/Helper/Placeholder.php b/src/Helper/Placeholder.php index 21be1064..32f62f8f 100644 --- a/src/Helper/Placeholder.php +++ b/src/Helper/Placeholder.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -17,9 +16,6 @@ * Placeholder to make its typical usage obvious, but can be used just as easily * for non-Placeholder things. That said, the support for this is only * guaranteed to effect subsequently rendered templates, and of course Layouts. - * - * @package Zend_View - * @subpackage Helper */ class Placeholder extends AbstractHelper { diff --git a/src/Helper/Placeholder/Container.php b/src/Helper/Placeholder/Container.php index ac1d0f08..eff1a325 100644 --- a/src/Helper/Placeholder/Container.php +++ b/src/Helper/Placeholder/Container.php @@ -5,16 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder; /** * Container for placeholder values - * - * @package Zend_View - * @subpackage Helper */ class Container extends Container\AbstractContainer { diff --git a/src/Helper/Placeholder/Container/AbstractContainer.php b/src/Helper/Placeholder/Container/AbstractContainer.php index 16096ab4..caa3668e 100644 --- a/src/Helper/Placeholder/Container/AbstractContainer.php +++ b/src/Helper/Placeholder/Container/AbstractContainer.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder\Container; @@ -14,9 +13,6 @@ /** * Abstract class representing container for placeholder values - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractContainer extends \ArrayObject { diff --git a/src/Helper/Placeholder/Container/AbstractStandalone.php b/src/Helper/Placeholder/Container/AbstractStandalone.php index 921bcf81..fc6e0238 100644 --- a/src/Helper/Placeholder/Container/AbstractStandalone.php +++ b/src/Helper/Placeholder/Container/AbstractStandalone.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder\Container; @@ -17,9 +16,6 @@ /** * Base class for targeted placeholder helpers - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractStandalone extends \Zend\View\Helper\AbstractHelper diff --git a/src/Helper/Placeholder/Registry.php b/src/Helper/Placeholder/Registry.php index e4a4f003..cb6ad672 100644 --- a/src/Helper/Placeholder/Registry.php +++ b/src/Helper/Placeholder/Registry.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder; @@ -14,9 +13,6 @@ /** * Registry for placeholder containers - * - * @package Zend_View - * @subpackage Helper */ class Registry { diff --git a/src/Helper/RenderChildModel.php b/src/Helper/RenderChildModel.php index f40c7432..153c767b 100644 --- a/src/Helper/RenderChildModel.php +++ b/src/Helper/RenderChildModel.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,9 +17,6 @@ * * Finds children matching "capture-to" values, and renders them using the * composed view instance. - * - * @package Zend_View - * @subpackage Helper */ class RenderChildModel extends AbstractHelper { diff --git a/src/Helper/RenderToPlaceholder.php b/src/Helper/RenderToPlaceholder.php index e0d81602..305669e7 100644 --- a/src/Helper/RenderToPlaceholder.php +++ b/src/Helper/RenderToPlaceholder.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ /** * Renders a template and stores the rendered output as a placeholder * variable for later use. - * - * @package Zend_View - * @subpackage Helper */ class RenderToPlaceholder extends AbstractHelper { diff --git a/src/Helper/ServerUrl.php b/src/Helper/ServerUrl.php index 8c91f49a..6dded929 100644 --- a/src/Helper/ServerUrl.php +++ b/src/Helper/ServerUrl.php @@ -5,17 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for returning the current server URL (optionally with request URI) - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class ServerUrl extends AbstractHelper { diff --git a/src/Helper/Service/FlashMessengerFactory.php b/src/Helper/Service/FlashMessengerFactory.php index 925fb67e..7838513b 100644 --- a/src/Helper/Service/FlashMessengerFactory.php +++ b/src/Helper/Service/FlashMessengerFactory.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Service; @@ -14,11 +13,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper\FlashMessenger; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class FlashMessengerFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) diff --git a/src/Helper/Url.php b/src/Helper/Url.php index 4f281f8d..6cba9ceb 100644 --- a/src/Helper/Url.php +++ b/src/Helper/Url.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -17,9 +16,6 @@ /** * Helper for making easy links and getting urls that depend on the routes and router. - * - * @package Zend_View - * @subpackage Helper */ class Url extends AbstractHelper { diff --git a/src/Helper/ViewModel.php b/src/Helper/ViewModel.php index b55ba2e8..264fc958 100644 --- a/src/Helper/ViewModel.php +++ b/src/Helper/ViewModel.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ /** * Helper for storing and retrieving the root and current view model - * - * @package Zend_View - * @subpackage Helper */ class ViewModel extends AbstractHelper { diff --git a/src/HelperPluginManager.php b/src/HelperPluginManager.php index 80ff9faf..d5e045c4 100644 --- a/src/HelperPluginManager.php +++ b/src/HelperPluginManager.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -20,9 +19,6 @@ * Enforces that helpers retrieved are instances of * Helper\HelperInterface. Additionally, it registers a number of default * helpers. - * - * @category Zend - * @package Zend_View */ class HelperPluginManager extends AbstractPluginManager { diff --git a/src/Model/ClearableModelInterface.php b/src/Model/ClearableModelInterface.php index 9d88e535..50501710 100644 --- a/src/Model/ClearableModelInterface.php +++ b/src/Model/ClearableModelInterface.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -15,10 +14,6 @@ * * View models implementing this interface allow clearing children, options, * and variables. - * - * @category Zend - * @package Zend_View - * @subpackage Model */ interface ClearableModelInterface { diff --git a/src/Model/ConsoleModel.php b/src/Model/ConsoleModel.php index 35ccaf37..77400f14 100644 --- a/src/Model/ConsoleModel.php +++ b/src/Model/ConsoleModel.php @@ -12,9 +12,6 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_View - * @subpackage Model * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,9 +20,6 @@ /** - * @category Zend - * @package Zend_View - * @subpackage Model * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/src/Model/FeedModel.php b/src/Model/FeedModel.php index 3791fe99..4a1cdc3f 100644 --- a/src/Model/FeedModel.php +++ b/src/Model/FeedModel.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -15,10 +14,6 @@ /** * Marker view model for indicating feed data. - * - * @category Zend - * @package Zend_View - * @subpackage Model */ class FeedModel extends ViewModel { diff --git a/src/Model/JsonModel.php b/src/Model/JsonModel.php index 830b4559..9bbed832 100644 --- a/src/Model/JsonModel.php +++ b/src/Model/JsonModel.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -14,11 +13,6 @@ use Zend\Json\Json; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_View - * @subpackage Model - */ class JsonModel extends ViewModel { /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 36e06983..804fdbc3 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -20,10 +19,6 @@ * to the model. * * Extends "IteratorAggregate"; should allow iterating over children. - * - * @category Zend - * @package Zend_View - * @subpackage Model */ interface ModelInterface extends Countable, IteratorAggregate { diff --git a/src/Model/ViewModel.php b/src/Model/ViewModel.php index 5b712ed6..47f3f40a 100644 --- a/src/Model/ViewModel.php +++ b/src/Model/ViewModel.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -18,11 +17,6 @@ use Zend\View\Model; use Zend\View\Variables as ViewVariables; -/** - * @category Zend - * @package Zend_View - * @subpackage Model - */ class ViewModel implements ModelInterface, ClearableModelInterface { /** diff --git a/src/Renderer/ConsoleRenderer.php b/src/Renderer/ConsoleRenderer.php index 50fc2994..6719604f 100644 --- a/src/Renderer/ConsoleRenderer.php +++ b/src/Renderer/ConsoleRenderer.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -20,9 +19,6 @@ * Note: all private variables in this class are prefixed with "__". This is to * mark them as part of the internal implementation, and thus prevent conflict * with variables injected into the renderer. - * - * @category Zend - * @package Zend_View */ class ConsoleRenderer implements RendererInterface, TreeRendererInterface { diff --git a/src/Renderer/FeedRenderer.php b/src/Renderer/FeedRenderer.php index 06486508..3e488a95 100644 --- a/src/Renderer/FeedRenderer.php +++ b/src/Renderer/FeedRenderer.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -17,10 +16,6 @@ /** * Interface class for Zend_View compatible template engine implementations - * - * @category Zend - * @package Zend_View - * @subpackage Renderer */ class FeedRenderer implements RendererInterface { diff --git a/src/Renderer/JsonRenderer.php b/src/Renderer/JsonRenderer.php index 8a1ed04c..f55e9373 100644 --- a/src/Renderer/JsonRenderer.php +++ b/src/Renderer/JsonRenderer.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -22,10 +21,6 @@ /** * JSON renderer - * - * @category Zend - * @package Zend_View - * @subpackage Renderer */ class JsonRenderer implements Renderer, TreeRendererInterface { diff --git a/src/Renderer/PhpRenderer.php b/src/Renderer/PhpRenderer.php index 92901a85..29fef051 100644 --- a/src/Renderer/PhpRenderer.php +++ b/src/Renderer/PhpRenderer.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -28,9 +27,6 @@ * Note: all private variables in this class are prefixed with "__". This is to * mark them as part of the internal implementation, and thus prevent conflict * with variables injected into the renderer. - * - * @category Zend - * @package Zend_View */ class PhpRenderer implements Renderer, TreeRendererInterface { diff --git a/src/Renderer/RendererInterface.php b/src/Renderer/RendererInterface.php index f238c151..79405b63 100644 --- a/src/Renderer/RendererInterface.php +++ b/src/Renderer/RendererInterface.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -15,9 +14,6 @@ /** * Interface class for Zend_View compatible template engine implementations - * - * @category Zend - * @package Zend_View */ interface RendererInterface { diff --git a/src/Renderer/TreeRendererInterface.php b/src/Renderer/TreeRendererInterface.php index 60ba0994..3407a9fd 100644 --- a/src/Renderer/TreeRendererInterface.php +++ b/src/Renderer/TreeRendererInterface.php @@ -5,16 +5,10 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Renderer - */ interface TreeRendererInterface { /** diff --git a/src/Resolver/AggregateResolver.php b/src/Resolver/AggregateResolver.php index 70d77338..2dc907ae 100644 --- a/src/Resolver/AggregateResolver.php +++ b/src/Resolver/AggregateResolver.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -16,11 +15,6 @@ use Zend\View\Renderer\RendererInterface as Renderer; use Zend\View\Resolver\ResolverInterface as Resolver; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ class AggregateResolver implements Countable, IteratorAggregate, ResolverInterface { const FAILURE_NO_RESOLVERS = 'AggregateResolver_Failure_No_Resolvers'; diff --git a/src/Resolver/ResolverInterface.php b/src/Resolver/ResolverInterface.php index b5e58694..37d9dd3e 100644 --- a/src/Resolver/ResolverInterface.php +++ b/src/Resolver/ResolverInterface.php @@ -5,18 +5,12 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ interface ResolverInterface { /** diff --git a/src/Resolver/TemplateMapResolver.php b/src/Resolver/TemplateMapResolver.php index a4fadf02..6c649def 100644 --- a/src/Resolver/TemplateMapResolver.php +++ b/src/Resolver/TemplateMapResolver.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -17,11 +16,6 @@ use Zend\View\Exception; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ class TemplateMapResolver implements IteratorAggregate, ResolverInterface { /** diff --git a/src/Resolver/TemplatePathStack.php b/src/Resolver/TemplatePathStack.php index eaf19712..c5ebb487 100644 --- a/src/Resolver/TemplatePathStack.php +++ b/src/Resolver/TemplatePathStack.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -18,10 +17,6 @@ /** * Resolves view scripts based on a stack of paths - * - * @category Zend - * @package Zend_View - * @subpackage Resolver */ class TemplatePathStack implements ResolverInterface { diff --git a/src/Strategy/FeedStrategy.php b/src/Strategy/FeedStrategy.php index 4796ea27..57545f06 100644 --- a/src/Strategy/FeedStrategy.php +++ b/src/Strategy/FeedStrategy.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -18,11 +17,6 @@ use Zend\View\Renderer\FeedRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class FeedStrategy implements ListenerAggregateInterface { /** diff --git a/src/Strategy/JsonStrategy.php b/src/Strategy/JsonStrategy.php index 097738b9..4a2be49d 100644 --- a/src/Strategy/JsonStrategy.php +++ b/src/Strategy/JsonStrategy.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -17,11 +16,6 @@ use Zend\View\Renderer\JsonRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class JsonStrategy implements ListenerAggregateInterface { /** diff --git a/src/Strategy/PhpRendererStrategy.php b/src/Strategy/PhpRendererStrategy.php index 40c5c92a..92fe5d9d 100644 --- a/src/Strategy/PhpRendererStrategy.php +++ b/src/Strategy/PhpRendererStrategy.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -15,11 +14,6 @@ use Zend\View\Renderer\PhpRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class PhpRendererStrategy implements ListenerAggregateInterface { /** diff --git a/src/Stream.php b/src/Stream.php index 9aefbe0e..6fdd012c 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -22,9 +21,6 @@ * written by * Mike Naberezny (@link http://mikenaberezny.com) * Paul M. Jones (@link http://paul-m-jones.com) - * - * @category Zend - * @package Zend_View */ class Stream { diff --git a/src/Variables.php b/src/Variables.php index 94157e09..f917389e 100644 --- a/src/Variables.php +++ b/src/Variables.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -18,8 +17,6 @@ * @todo Allow specifying string names for manager, filter chain, variables * @todo Move escaping into variables object * @todo Move strict variables into variables object - * @category Zend - * @package Zend_View */ class Variables extends ArrayObject { diff --git a/src/View.php b/src/View.php index 246c5f83..511f406a 100644 --- a/src/View.php +++ b/src/View.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -19,10 +18,6 @@ use Zend\View\Renderer\RendererInterface as Renderer; use Zend\View\Renderer\TreeRendererInterface; -/** - * @category Zend - * @package Zend_View - */ class View implements EventManagerAwareInterface { /** diff --git a/src/ViewEvent.php b/src/ViewEvent.php index 0c8aa390..2392f1d3 100644 --- a/src/ViewEvent.php +++ b/src/ViewEvent.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -17,10 +16,6 @@ use Zend\View\Model\ModelInterface as Model; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - */ class ViewEvent extends Event { /**#@+ From 1b4a9652573f792dda443e7106ebcd225065caa7 Mon Sep 17 00:00:00 2001 From: frank87 Date: Tue, 22 Jan 2013 22:45:03 +0100 Subject: [PATCH 21/29] BugFix for hasAcl and hasRole: Both method ignore default member variables --- test/Helper/Navigation/AbstractHelperTest.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php index 4542397f..fd0b157a 100644 --- a/test/Helper/Navigation/AbstractHelperTest.php +++ b/test/Helper/Navigation/AbstractHelperTest.php @@ -1,10 +1,5 @@ Date: Wed, 23 Jan 2013 12:30:01 +0100 Subject: [PATCH 22/29] added braces to null comparison --- src/Renderer/JsonRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Renderer/JsonRenderer.php b/src/Renderer/JsonRenderer.php index 1f5fd49c..0f088a7c 100644 --- a/src/Renderer/JsonRenderer.php +++ b/src/Renderer/JsonRenderer.php @@ -107,7 +107,7 @@ public function setJsonpCallback($callback) */ public function hasJsonpCallback() { - return null !== $this->jsonpCallback; + return (null !== $this->jsonpCallback); } /** From 47f3d2f3152819adf3b82715659135b1f40a416a Mon Sep 17 00:00:00 2001 From: frank87 Date: Wed, 23 Jan 2013 20:08:30 +0100 Subject: [PATCH 23/29] Refactoring as its described in https://github.com/zendframework/zf2/pull/3530 --- src/Helper/Navigation/AbstractHelper.php | 8 ++++---- test/Helper/Navigation/AbstractHelperTest.php | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index 828d5b2c..7c002929 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -567,8 +567,8 @@ public function hasContainer() */ public function hasAcl() { - if ($this->acl instanceof \Zend\Permissions\Acl\Acl || - static::$defaultAcl instanceof \Zend\Permissions\Acl\Acl) { + if ($this->acl instanceof Acl\Acl || + static::$defaultAcl instanceof Acl\Acl) { return true; } @@ -584,9 +584,9 @@ public function hasAcl() */ public function hasRole() { - if ($this->role instanceof \Zend\Permissions\Acl\Role\RoleInterface || + if ($this->role instanceof Acl\Role\RoleInterface || is_string($this->role) || - static::$defaultRole instanceof \Zend\Permissions\Acl\Role\RoleInterface || + static::$defaultRole instanceof Acl\Role\RoleInterface || is_string(static::$defaultRole)) { return true; } diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php index fd0b157a..40b12d54 100644 --- a/test/Helper/Navigation/AbstractHelperTest.php +++ b/test/Helper/Navigation/AbstractHelperTest.php @@ -5,6 +5,16 @@ class AbstractHelperTest extends AbstractTest { + + protected function tearDown() + { + parent::tearDown(); + $this->_helper->setDefaultAcl(null); + $this->_helper->setAcl(null); + $this->_helper->setDefaultRole(null); + $this->_helper->setRole(null); + } + /** * Class name for view helper to test * @@ -63,14 +73,4 @@ public function testHasRoleChecksMemberVariable() $this->assertEquals(true, $this->_helper->hasRole()); } - protected function tearDown() - { - parent::tearDown(); - $this->_helper->setDefaultAcl(null); - $this->_helper->setAcl(null); - $this->_helper->setDefaultRole(null); - $this->_helper->setRole(null); - } - - } From 88eec35299cd96a6870127b94e0746719a8a6879 Mon Sep 17 00:00:00 2001 From: frank87 Date: Wed, 23 Jan 2013 20:10:27 +0100 Subject: [PATCH 24/29] Refactoring as its described in https://github.com/zendframework/zf2/pull/3530 --- test/Helper/Navigation/AbstractHelperTest.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php index 40b12d54..5a23a3bb 100644 --- a/test/Helper/Navigation/AbstractHelperTest.php +++ b/test/Helper/Navigation/AbstractHelperTest.php @@ -5,16 +5,6 @@ class AbstractHelperTest extends AbstractTest { - - protected function tearDown() - { - parent::tearDown(); - $this->_helper->setDefaultAcl(null); - $this->_helper->setAcl(null); - $this->_helper->setDefaultRole(null); - $this->_helper->setRole(null); - } - /** * Class name for view helper to test * @@ -29,6 +19,15 @@ protected function tearDown() */ protected $_helper; + protected function tearDown() + { + parent::tearDown(); + $this->_helper->setDefaultAcl(null); + $this->_helper->setAcl(null); + $this->_helper->setDefaultRole(null); + $this->_helper->setRole(null); + } + public function testHasACLChecksDefaultACL() { $aclContainer = $this->_getAcl(); From 565ff2876e2cee0069a0004ceac9d7cebbac8fdb Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 25 Jan 2013 16:40:24 +0100 Subject: [PATCH 25/29] [zendframework/zf2#3530] CS fixes - Update logical conditions; logical operators go on next line; open brace on next line when you have multi-line conditions - Add file-level docblock to test class --- src/Helper/Navigation/AbstractHelper.php | 14 ++++++++------ test/Helper/Navigation/AbstractHelperTest.php | 13 ++++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Helper/Navigation/AbstractHelper.php b/src/Helper/Navigation/AbstractHelper.php index 7c002929..dfd92540 100644 --- a/src/Helper/Navigation/AbstractHelper.php +++ b/src/Helper/Navigation/AbstractHelper.php @@ -567,8 +567,9 @@ public function hasContainer() */ public function hasAcl() { - if ($this->acl instanceof Acl\Acl || - static::$defaultAcl instanceof Acl\Acl) { + if ($this->acl instanceof Acl\Acl + || static::$defaultAcl instanceof Acl\Acl + ) { return true; } @@ -584,10 +585,11 @@ public function hasAcl() */ public function hasRole() { - if ($this->role instanceof Acl\Role\RoleInterface || - is_string($this->role) || - static::$defaultRole instanceof Acl\Role\RoleInterface || - is_string(static::$defaultRole)) { + if ($this->role instanceof Acl\Role\RoleInterface + || is_string($this->role) + || static::$defaultRole instanceof Acl\Role\RoleInterface + || is_string(static::$defaultRole) + ) { return true; } diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php index 5a23a3bb..8c6652bd 100644 --- a/test/Helper/Navigation/AbstractHelperTest.php +++ b/test/Helper/Navigation/AbstractHelperTest.php @@ -1,4 +1,12 @@ _getAcl(); - /** @var $acl \Zend\Permissions\Acl\Acl */ $acl = $aclContainer['acl']; $this->assertEquals(false, $this->_helper->hasACL()); @@ -42,7 +49,6 @@ public function testHasACLChecksDefaultACL() public function testHasACLChecksMemberVariable() { $aclContainer = $this->_getAcl(); - /** @var $acl \Zend\Permissions\Acl\Acl */ $acl = $aclContainer['acl']; $this->assertEquals(false, $this->_helper->hasAcl()); @@ -53,7 +59,6 @@ public function testHasACLChecksMemberVariable() public function testHasRoleChecksDefaultRole() { $aclContainer = $this->_getAcl(); - /** @var $role \Zend\Permissions\Acl\Role */ $role = $aclContainer['role']; $this->assertEquals(false, $this->_helper->hasRole()); @@ -64,12 +69,10 @@ public function testHasRoleChecksDefaultRole() public function testHasRoleChecksMemberVariable() { $aclContainer = $this->_getAcl(); - /** @var $role \Zend\Permissions\Acl\Role */ $role = $aclContainer['role']; $this->assertEquals(false, $this->_helper->hasRole()); $this->_helper->setRole($role); $this->assertEquals(true, $this->_helper->hasRole()); } - } From 3cb4c0f4e07464d8065982cdb85a61c909e76227 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 25 Jan 2013 16:43:37 +0100 Subject: [PATCH 26/29] [zendframework/zf2#3530] Remove @package annotation - these are removed on the develop branch --- test/Helper/Navigation/AbstractHelperTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/test/Helper/Navigation/AbstractHelperTest.php b/test/Helper/Navigation/AbstractHelperTest.php index 8c6652bd..b8c6d921 100644 --- a/test/Helper/Navigation/AbstractHelperTest.php +++ b/test/Helper/Navigation/AbstractHelperTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace ZendTest\View\Helper\Navigation; From ebe54b870f8beb70e11176c161d0a0c3685bc73d Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 25 Jan 2013 17:37:55 +0100 Subject: [PATCH 27/29] Fix test failure in PhpRenderer tests - Due to change in PHPUnit, can no longer have top-level Exception as an expected exception --- test/PhpRendererTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/PhpRendererTest.php b/test/PhpRendererTest.php index 85110957..0e66125b 100644 --- a/test/PhpRendererTest.php +++ b/test/PhpRendererTest.php @@ -340,8 +340,12 @@ public function testRendererRaisesExceptionInCaseOfExceptionInView() $model = new ViewModel(); $model->setTemplate('exception'); - $this->setExpectedException('Exception', 'thrown from view script'); - $this->renderer->render($model); + try { + $this->renderer->render($model); + $this->fail('Exception from renderer should propagate'); + } catch (\Exception $e) { + $this->assertInstanceOf('Exception', $e); + } } public function testRendererRaisesExceptionIfResolverCannotResolveTemplate() From 05edc70bf8d270a9ddc260a4bced63e9bb87a5f1 Mon Sep 17 00:00:00 2001 From: wryck7 Date: Mon, 28 Jan 2013 02:03:48 -0200 Subject: [PATCH 28/29] Fixed breakline to script with content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it was printing:     now it is printing:      this does not affect when there is no content, it still prints:      --- src/Helper/HeadScript.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helper/HeadScript.php b/src/Helper/HeadScript.php index cced6c83..7928019b 100644 --- a/src/Helper/HeadScript.php +++ b/src/Helper/HeadScript.php @@ -425,7 +425,7 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd) $html .= $indent . PHP_EOL . ' ' . $escapeEnd; } - $html .= $indent; + $html .= PHP_EOL . $indent; } $html .= ''; From 05af7e983eee57c401d98a317b53b14bb4a4314d Mon Sep 17 00:00:00 2001 From: wryck7 Date: Mon, 28 Jan 2013 02:06:36 -0200 Subject: [PATCH 29/29] Removed unnecessary space --- src/Helper/HeadScript.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helper/HeadScript.php b/src/Helper/HeadScript.php index 7928019b..a515c01b 100644 --- a/src/Helper/HeadScript.php +++ b/src/Helper/HeadScript.php @@ -433,7 +433,7 @@ public function itemToString($item, $indent, $escapeStart, $escapeEnd) && !empty($item->attributes['conditional']) && is_string($item->attributes['conditional'])) { - $html = $indent . ''; + $html = $indent . ''; } else { $html = $indent . $html; }