[TASK][WIP] Move non class code back to source files
authorThomas Maroschik <tmaroschik@dfau.de>
Wed, 17 Oct 2012 19:18:26 +0000 (21:18 +0200)
committerThomas Maroschik <tmaroschik@dfau.de>
Wed, 17 Oct 2012 19:18:26 +0000 (21:18 +0200)
Change-Id: I620d2e61860142cdc89cc83474c95542799961c0

231 files changed:
typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php
typo3/sysext/fluid/Classes/Core/Compiler/AbstractCompiledTemplate.php
typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php
typo3/sysext/fluid/Classes/Core/Exception.php
typo3/sysext/fluid/Classes/Core/Parser/Configuration.php
typo3/sysext/fluid/Classes/Core/Parser/Exception.php
typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php
typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php
typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php
typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextInterface.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/CompilableInterface.php
typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php
typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php
typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php
typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php
typo3/sysext/fluid/Classes/Core/Widget/Bootstrap.php
typo3/sysext/fluid/Classes/Core/Widget/Exception.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/MissingControllerException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/RenderingContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetContextNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/Exception/WidgetRequestNotFoundException.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetContext.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestBuilder.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestHandler.php
typo3/sysext/fluid/Classes/Exception.php
typo3/sysext/fluid/Classes/Fluid.php
typo3/sysext/fluid/Classes/Service/DocbookGenerator.php
typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
typo3/sysext/fluid/Classes/View/Exception.php
typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php
typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Classes/View/TemplateView.php
typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CommentViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/ValidationResultsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/AbstractEncodingViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CdataViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlentitiesDecodeViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlentitiesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlspecialcharsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/RawViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/StripTagsViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/UrlencodeViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderChildrenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/AutocompleteViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/LinkViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Compiler/AbstractCompiledTemplateTest.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/Core/Compiler/AbstractCompilerTemplateTest.php
typo3/sysext/fluid/Tests/Unit/Core/Fixtures/TestViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Fixtures/TestViewHelper2.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture01-shorthand-split.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture06-split.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/TemplateParserTestFixture14-split.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/BooleanNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractConditionViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractTagBasedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TagBuilderTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetControllerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AjaxWidgetContextHolderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestBuilderTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestHandlerTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestTest.php
typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php
typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/View/StandaloneViewTest.php
typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/FormFieldViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesDecodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlspecialcharsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/RawViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/StripTagsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderChildrenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/RenderViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
typo3/sysext/fluid/ext_autoload.php
typo3/sysext/fluid/ext_emconf.php
typo3/sysext/fluid/ext_localconf.php
typo3/sysext/fluid/ext_tables.php

index 571213f..b3d684a 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is part of the TYPO3 project - inspiring people to share!  *
  *                                                                        *
@@ -12,8 +11,8 @@
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  *                                                                        */
-
 /**
+
  */
 /**
  * Class extending the docbook generator service for use in typo3 v4.
  * Usage in TypoScript:
  *
  *
-
-config.disableAllHeaderCode = 1
-page = PAGE
-page.10 = USER_INT
-page.10.userFunc = Tx_Fluid_Compatibility_DocbookGeneratorService->userFunc
-
+ *
+ * config.disableAllHeaderCode = 1
+ * page = PAGE
+ * page.10 = USER_INT
+ * page.10.userFunc = Tx_Fluid_Compatibility_DocbookGeneratorService->userFunc
+ *
  * @internal
  */
 class Tx_Fluid_Compatibility_DocbookGeneratorService extends Tx_Fluid_Service_DocbookGenerator {
 
        public function userFunc() {
                if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {
-                       require(t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php');
+                       require t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php';
                }
-
                $classLoader = new Tx_Extbase_Utility_ClassLoader();
                spl_autoload_register(array($classLoader, 'loadClass'));
                return $this->generateDocbook('Tx_Fluid_ViewHelpers');
        }
+
        protected function getClassNamesInNamespace($namespace) {
                $namespaceParts = explode('_', $namespace);
-               if ($namespaceParts[count($namespaceParts) -1] == '') {
+               if ($namespaceParts[count($namespaceParts) - 1] == '') {
 
                }
                $classFilePathAndName = t3lib_extMgm::extPath(t3lib_div::camelCaseToLowerCaseUnderscored($namespaceParts[1])) . 'Classes/';
                $classFilePathAndName .= implode(array_slice($namespaceParts, 2, -1), '/') . '/';
                $classNames = array();
                $this->recursiveClassNameSearch($namespace, $classFilePathAndName, $classNames);
-
                sort($classNames);
                return $classNames;
-
        }
 
        private function recursiveClassNameSearch($namespace, $directory, &$classNames) {
                $dh = opendir($directory);
                while (($file = readdir($dh)) !== false) {
-                       if ($file == '.' || $file == '..' || $file == '.svn') continue;
-
+                       if (($file == '.' || $file == '..') || $file == '.svn') {
+                               continue;
+                       }
                        if (is_file($directory . $file)) {
-                               if (substr($file, 0, 8) == 'Abstract') continue;
-
+                               if (substr($file, 0, 8) == 'Abstract') {
+                                       continue;
+                               }
                                $classNames[] = $namespace . substr($file, 0, -4);
                        } elseif (is_dir($directory . $file)) {
-                               $this->recursiveClassNameSearch($namespace . $file . '_' , $directory . $file . '/', $classNames);
+                               $this->recursiveClassNameSearch(($namespace . $file) . '_', ($directory . $file) . '/', $classNames);
                        }
-        }
-        closedir($dh);
+               }
+               closedir($dh);
        }
 
        protected function instanciateViewHelper($className) {
                $objectFactory = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
                return $objectFactory->create($className);
        }
+
 }
 
 ?>
\ No newline at end of file
index ba4bb35..5675477 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-
-
 /*                                                                        *
  * This script is part of the TYPO3 project - inspiring people to share!  *
  *                                                                        *
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  *                                                                        */
-
 /**
+
  */
 /**
  * Build a template parser.
  * Use this class to get a fresh instance of a correctly initialized Fluid template parser.
  */
 class Tx_Fluid_Compatibility_TemplateParserBuilder {
+
        /**
         * Creates a new TemplateParser which is correctly initialized. This is the correct
         * way to get a Fluid parser instance.
@@ -32,7 +31,7 @@ class Tx_Fluid_Compatibility_TemplateParserBuilder {
                $templateParser->injectObjectManager(t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager'));
                return $templateParser;
        }
-}
 
+}
 
 ?>
\ No newline at end of file
index bc38425..b6f6415 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,10 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Abstract Fluid Compiled template.
  *
  * INTERNAL!!
- *
  */
 abstract class Tx_Fluid_Core_Compiler_AbstractCompiledTemplate implements Tx_Fluid_Core_Parser_ParsedTemplateInterface {
 
@@ -28,7 +24,7 @@ abstract class Tx_Fluid_Core_Compiler_AbstractCompiledTemplate implements Tx_Flu
        /**
         * @var Tx_Extbase_Object_Container_Container
         */
-       protected static $objectContainer;
+       static protected $objectContainer;
 
        /**
         * @var string
@@ -46,7 +42,7 @@ abstract class Tx_Fluid_Core_Compiler_AbstractCompiledTemplate implements Tx_Flu
         */
        public function getViewHelper($uniqueCounter, Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext, $viewHelperName) {
                if (self::$objectContainer === NULL) {
-                       self::$objectContainer = t3lib_div::makeInstance('Tx_Extbase_Object_Container_Container'); // Singleton
+                       self::$objectContainer = t3lib_div::makeInstance('Tx_Extbase_Object_Container_Container');
                }
                if (isset($this->viewHelpersByPositionAndContext[$uniqueCounter])) {
                        if ($this->viewHelpersByPositionAndContext[$uniqueCounter]->contains($renderingContext)) {
@@ -98,4 +94,5 @@ abstract class Tx_Fluid_Core_Compiler_AbstractCompiledTemplate implements Tx_Flu
        }
 
 }
+
 ?>
\ No newline at end of file
index 48ffe22..791d26d 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,14 +8,12 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
+
  */
 class Tx_Fluid_Core_Compiler_TemplateCompiler implements t3lib_Singleton {
 
        const SHOULD_GENERATE_VIEWHELPER_INVOCATION = '##should_gen_viewhelper##';
-
        /**
         * @var t3lib_cache_frontend_PhpFrontend
         */
@@ -60,7 +57,6 @@ class Tx_Fluid_Core_Compiler_TemplateCompiler implements t3lib_Singleton {
                        $templateClassName = 'FluidCache_' . $identifier;
                        $this->syntaxTreeInstanceCache[$identifier] = new $templateClassName();
                }
-
                return $this->syntaxTreeInstanceCache[$identifier];
        }
 
@@ -73,28 +69,23 @@ class Tx_Fluid_Core_Compiler_TemplateCompiler implements t3lib_Singleton {
                $identifier = $this->sanitizeIdentifier($identifier);
                $this->variableCounter = 0;
                $generatedRenderFunctions = '';
-
                if ($parsingState->getVariableContainer()->exists('sections')) {
-                       $sections = $parsingState->getVariableContainer()->get('sections'); // TODO: refactor to $parsedTemplate->getSections()
+                       $sections = $parsingState->getVariableContainer()->get('sections');
+                       // TODO: refactor to $parsedTemplate->getSections()
                        foreach ($sections as $sectionName => $sectionRootNode) {
                                $generatedRenderFunctions .= $this->generateCodeForSection($this->convertListOfSubNodes($sectionRootNode), 'section_' . sha1($sectionName), 'section ' . $sectionName);
                        }
                }
-
                $generatedRenderFunctions .= $this->generateCodeForSection($this->convertListOfSubNodes($parsingState->getRootNode()), 'render', 'Main Render function');
-
                $convertedLayoutNameNode = $parsingState->hasLayout() ? $this->convert($parsingState->getLayoutNameNode()) : array('initialization' => '', 'execution' => 'NULL');
-
-               $classDefinition = 'class FluidCache_' . $identifier . ' extends Tx_Fluid_Core_Compiler_AbstractCompiledTemplate';
-
-               $templateCode = <<<EOD
-%s {
+               $classDefinition = ('class FluidCache_' . $identifier) . ' extends Tx_Fluid_Core_Compiler_AbstractCompiledTemplate';
+               $templateCode = '%s {
 
 public function getVariableContainer() {
        // TODO
        return new Tx_Fluid_Core_ViewHelper_TemplateVariableContainer();
 }
-public function getLayoutName(Tx_Fluid_Core_Rendering_RenderingContextInterface \$renderingContext) {
+public function getLayoutName(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 %s
 return %s;
 }
@@ -104,40 +95,31 @@ return %s;
 
 %s
 
-}
-EOD;
-               $templateCode = sprintf($templateCode,
-                               $classDefinition,
-                               $convertedLayoutNameNode['initialization'],
-                               $convertedLayoutNameNode['execution'],
-                               ($parsingState->hasLayout() ? 'TRUE' : 'FALSE'),
-                               $generatedRenderFunctions);
+}';
+               $templateCode = sprintf($templateCode, $classDefinition, $convertedLayoutNameNode['initialization'], $convertedLayoutNameNode['execution'], $parsingState->hasLayout() ? 'TRUE' : 'FALSE', $generatedRenderFunctions);
                $this->templateCache->set($identifier, $templateCode);
        }
 
        /**
         * Replaces special characters by underscores
-        * @see http://www.php.net/manual/en/language.variables.basics.php
         *
+        * @see http://www.php.net/manual/en/language.variables.basics.php
         * @param string $identifier
         * @return string the sanitized identifier
         */
        protected function sanitizeIdentifier($identifier) {
-               return preg_replace('([^a-zA-Z0-9_\x7f-\xff])', '_', $identifier);
+               return preg_replace('([^a-zA-Z0-9_\\x7f-\\xff])', '_', $identifier);
        }
 
        protected function generateCodeForSection($converted, $expectedFunctionName, $comment) {
-               $templateCode = <<<EOD
-/**
+               $templateCode = '/**
  * %s
  */
-public function %s(Tx_Fluid_Core_Rendering_RenderingContextInterface \$renderingContext) {
-\$self = \$this;
+public function %s(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+$self = $this;
 %s
 return %s;
-}
-
-EOD;
+}';
                return sprintf($templateCode, $comment, $expectedFunctionName, $converted['initialization'], $converted['execution']);
        }
 
@@ -145,6 +127,7 @@ EOD;
         * Returns an array with two elements:
         * - initialization: contains PHP code which is inserted *before* the actual rendering call. Must be valid, i.e. end with semi-colon.
         * - execution: contains *a single PHP instruction* which needs to return the rendered output of the given element. Should NOT end with semi-colon.
+        *
         * @param Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $node
         * @return array two-element array, see above
         */
@@ -161,7 +144,7 @@ EOD;
                        return $this->convertListOfSubNodes($node);
                } elseif ($node instanceof Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode) {
                        return $this->convertBooleanNode($node);
-               }else {
+               } else {
                        throw new Exception('TODO: TYPE XY NOT FOUND');
                }
        }
@@ -174,7 +157,7 @@ EOD;
        protected function convertTextNode(Tx_Fluid_Core_Parser_SyntaxTree_TextNode $node) {
                return array(
                        'initialization' => '',
-                       'execution' => '\'' . $this->escapeTextForUseInSingleQuotes($node->getText()) . '\''
+                       'execution' => ('\'' . $this->escapeTextForUseInSingleQuotes($node->getText())) . '\''
                );
        }
 
@@ -187,12 +170,10 @@ EOD;
         * @see convert()
         */
        protected function convertViewHelperNode(Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode $node) {
-               $initializationPhpCode = '// Rendering ViewHelper ' . $node->getViewHelperClassName() . chr(10);
-
-                       // Build up $arguments array
+               $initializationPhpCode = ('// Rendering ViewHelper ' . $node->getViewHelperClassName()) . chr(10);
+               // Build up $arguments array
                $argumentsVariableName = $this->variableName('arguments');
                $initializationPhpCode .= sprintf('%s = array();', $argumentsVariableName) . chr(10);
-
                $alreadyBuiltArguments = array();
                foreach ($node->getArguments() as $argumentName => $argumentValue) {
                        $converted = $this->convert($argumentValue);
@@ -200,19 +181,16 @@ EOD;
                        $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $argumentsVariableName, $argumentName, $converted['execution']) . chr(10);
                        $alreadyBuiltArguments[$argumentName] = TRUE;
                }
-
                foreach ($node->getUninitializedViewHelper()->prepareArguments() as $argumentName => $argumentDefinition) {
                        if (!isset($alreadyBuiltArguments[$argumentName])) {
                                $initializationPhpCode .= sprintf('%s[\'%s\'] = %s;', $argumentsVariableName, $argumentName, var_export($argumentDefinition->getDefaultValue(), TRUE)) . chr(10);
                        }
                }
-
-                       // Build up closure which renders the child nodes
+               // Build up closure which renders the child nodes
                $renderChildrenClosureVariableName = $this->variableName('renderChildrenClosure');
                $initializationPhpCode .= sprintf('%s = %s;', $renderChildrenClosureVariableName, $this->wrapChildNodesInClosure($node)) . chr(10);
-
                if ($node->getUninitializedViewHelper() instanceof Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface) {
-                               // ViewHelper is compilable
+                       // ViewHelper is compilable
                        $viewHelperInitializationPhpCode = '';
                        $convertedViewHelperExecutionCode = $node->getUninitializedViewHelper()->compile($argumentsVariableName, $renderChildrenClosureVariableName, $viewHelperInitializationPhpCode, $node, $this);
                        $initializationPhpCode .= $viewHelperInitializationPhpCode;
@@ -223,18 +201,13 @@ EOD;
                                );
                        }
                }
-
-                       // ViewHelper is not compilable, so we need to instanciate it directly and render it.
+               // ViewHelper is not compilable, so we need to instanciate it directly and render it.
                $viewHelperVariableName = $this->variableName('viewHelper');
-
                $initializationPhpCode .= sprintf('%s = $self->getViewHelper(\'%s\', $renderingContext, \'%s\');', $viewHelperVariableName, $viewHelperVariableName, $node->getViewHelperClassName()) . chr(10);
                $initializationPhpCode .= sprintf('%s->setArguments(%s);', $viewHelperVariableName, $argumentsVariableName) . chr(10);
                $initializationPhpCode .= sprintf('%s->setRenderingContext($renderingContext);', $viewHelperVariableName) . chr(10);
-
                $initializationPhpCode .= sprintf('%s->setRenderChildrenClosure(%s);', $viewHelperVariableName, $renderChildrenClosureVariableName) . chr(10);
-
-               $initializationPhpCode .= '// End of ViewHelper ' . $node->getViewHelperClassName() . chr(10);
-
+               $initializationPhpCode .= ('// End of ViewHelper ' . $node->getViewHelperClassName()) . chr(10);
                return array(
                        'initialization' => $initializationPhpCode,
                        'execution' => sprintf('%s->initializeArgumentsAndRender()', $viewHelperVariableName)
@@ -261,9 +234,7 @@ EOD;
        protected function convertArrayNode(Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode $node) {
                $initializationPhpCode = '// Rendering Array' . chr(10);
                $arrayVariableName = $this->variableName('array');
-
                $initializationPhpCode .= sprintf('%s = array();', $arrayVariableName) . chr(10);
-
                foreach ($node->getInternalArray() as $key => $value) {
                        if ($value instanceof Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode) {
                                $converted = $this->convert($value);
@@ -290,30 +261,26 @@ EOD;
         */
        public function convertListOfSubNodes(Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $node) {
                switch (count($node->getChildNodes())) {
-                       case 0:
-                               return array(
-                                       'initialization' => '',
-                                       'execution' => 'NULL'
-                               );
-                       case 1:
-                               $converted = $this->convert(current($node->getChildNodes()));
-
-                               return $converted;
-                       default:
-                               $outputVariableName = $this->variableName('output');
-                               $initializationPhpCode = sprintf('%s = \'\';', $outputVariableName) . chr(10);
-
-                               foreach ($node->getChildNodes() as $childNode) {
-                                       $converted = $this->convert($childNode);
-
-                                       $initializationPhpCode .= $converted['initialization'] . chr(10);
-                                       $initializationPhpCode .= sprintf('%s .= %s;', $outputVariableName, $converted['execution']) . chr(10);
-                               }
-
-                               return array(
-                                       'initialization' => $initializationPhpCode,
-                                       'execution' => $outputVariableName
-                               );
+               case 0:
+                       return array(
+                               'initialization' => '',
+                               'execution' => 'NULL'
+                       );
+               case 1:
+                       $converted = $this->convert(current($node->getChildNodes()));
+                       return $converted;
+               default:
+                       $outputVariableName = $this->variableName('output');
+                       $initializationPhpCode = sprintf('%s = \'\';', $outputVariableName) . chr(10);
+                       foreach ($node->getChildNodes() as $childNode) {
+                               $converted = $this->convert($childNode);
+                               $initializationPhpCode .= $converted['initialization'] . chr(10);
+                               $initializationPhpCode .= sprintf('%s .= %s;', $outputVariableName, $converted['execution']) . chr(10);
+                       }
+                       return array(
+                               'initialization' => $initializationPhpCode,
+                               'execution' => $outputVariableName
+                       );
                }
        }
 
@@ -327,9 +294,8 @@ EOD;
                if ($node->getComparator() !== NULL) {
                        $convertedLeftSide = $this->convert($node->getLeftSide());
                        $convertedRightSide = $this->convert($node->getRightSide());
-
                        return array(
-                               'initialization' => $initializationPhpCode . $convertedLeftSide['initialization'] . $convertedRightSide['initialization'],
+                               'initialization' => ($initializationPhpCode . $convertedLeftSide['initialization']) . $convertedRightSide['initialization'],
                                'execution' => sprintf('Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode::evaluateComparator(\'%s\', %s, %s)', $node->getComparator(), $convertedLeftSide['execution'], $convertedRightSide['execution'])
                        );
                } else {
@@ -342,13 +308,12 @@ EOD;
                }
        }
 
-
        /**
         * @param string $text
         * @return string
         */
        protected function escapeTextForUseInSingleQuotes($text) {
-                return str_replace(array('\\', '\''), array('\\\\', '\\\''), $text);
+               return str_replace(array('\\', '\''), array('\\\\', '\\\''), $text);
        }
 
        /**
@@ -372,8 +337,9 @@ EOD;
         * @return string
         */
        public function variableName($prefix) {
-               return '$' . $prefix . $this->variableCounter++;
+               return ('$' . $prefix) . $this->variableCounter++;
        }
+
 }
 
 ?>
\ No newline at end of file
index b6f21a8..bf53803 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A generic Fluid Core exception.
  *
  * @api
  */
 class Tx_Fluid_Core_Exception extends Tx_Fluid_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 368c25c..14d0fe8 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,16 +8,15 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * The parser configuration. Contains all configuration needed to configure
  * the building of a SyntaxTree.
- *
  */
 class Tx_Fluid_Core_Parser_Configuration {
 
        /**
         * Generic interceptors registered with the configuration.
+        *
         * @var array<Tx_Extbase_Persistence_ObjectStorage>
         */
        protected $interceptors = array();
@@ -54,4 +52,5 @@ class Tx_Fluid_Core_Parser_Configuration {
        }
 
 }
+
 ?>
\ No newline at end of file
index 7240bfa..dfd9c86 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A Parsing Exception
  *
  * @api
  */
 class Tx_Fluid_Core_Parser_Exception extends Tx_Fluid_Core_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 5c1437d..b85e0a7 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,15 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An interceptor adding the escape viewhelper to the suitable places.
- *
  */
 class Tx_Fluid_Core_Parser_Interceptor_Escape implements Tx_Fluid_Core_Parser_InterceptorInterface {
 
        /**
         * Is the interceptor enabled right now?
+        *
         * @var boolean
         */
        protected $interceptorEnabled = TRUE;
@@ -69,11 +67,7 @@ class Tx_Fluid_Core_Parser_Interceptor_Escape implements Tx_Fluid_Core_Parser_In
                        }
                } elseif ($this->interceptorEnabled && $node instanceof Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode) {
                        $escapeViewHelper = $this->objectManager->get('Tx_Fluid_ViewHelpers_Format_HtmlspecialcharsViewHelper');
-                       $node = $this->objectManager->create(
-                               'Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode',
-                               $escapeViewHelper,
-                               array('value' => $node)
-                       );
+                       $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', $escapeViewHelper, array('value' => $node));
                }
                return $node;
        }
@@ -90,5 +84,7 @@ class Tx_Fluid_Core_Parser_Interceptor_Escape implements Tx_Fluid_Core_Parser_In
                        Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OBJECTACCESSOR
                );
        }
+
 }
+
 ?>
\ No newline at end of file
index 51598d8..d173f68 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,19 +8,16 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An interceptor interface. Interceptors are used in the parsing stage to change
  * the syntax tree of a template, e.g. by adding viewhelper nodes.
- *
  */
-interface Tx_Fluid_Core_Parser_InterceptorInterface {
-
+interface Tx_Fluid_Core_Parser_InterceptorInterface
+{
        const INTERCEPT_OPENING_VIEWHELPER = 1;
        const INTERCEPT_CLOSING_VIEWHELPER = 2;
        const INTERCEPT_TEXT = 3;
        const INTERCEPT_OBJECTACCESSOR = 4;
-
        /**
         * The interceptor can process the given node at will and must return a node
         * that will be used in place of the given node.
@@ -39,5 +35,6 @@ interface Tx_Fluid_Core_Parser_InterceptorInterface {
         * @return array Array of INTERCEPT_* constants
         */
        public function getInterceptionPoints();
+
 }
 ?>
\ No newline at end of file
index 54f35db..b96df92 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,14 +8,12 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * This interface is returned by Tx_Fluid_Core_Parser_TemplateParser->parse()
  * method and is a parsed template
- *
  */
-interface Tx_Fluid_Core_Parser_ParsedTemplateInterface {
-
+interface Tx_Fluid_Core_Parser_ParsedTemplateInterface
+{
        /**
         * Render the parsed template with rendering context
         *
@@ -45,8 +42,8 @@ interface Tx_Fluid_Core_Parser_ParsedTemplateInterface {
 
        /**
         * Returns TRUE if the current template has a template defined via <f:layout name="..." />
-        * @see getLayoutName()
         *
+        * @see getLayoutName()
         * @return boolean
         */
        public function hasLayout();
@@ -63,6 +60,6 @@ interface Tx_Fluid_Core_Parser_ParsedTemplateInterface {
         * @return boolean TRUE if the template is already compiled, FALSE otherwise
         */
        public function isCompiled();
-}
 
+}
 ?>
\ No newline at end of file
index 4bce511..7a73c62 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,23 +8,23 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Stores all information relevant for one parsing pass - that is, the root node,
  * and the current stack of open nodes (nodeStack) and a variable container used
  * for PostParseFacets.
- *
  */
 class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTemplateInterface {
 
        /**
         * Root node reference
+        *
         * @var Tx_Fluid_Core_Parser_SyntaxTree_RootNode
         */
        protected $rootNode;
 
        /**
         * Array of node references currently open.
+        *
         * @var array
         */
        protected $nodeStack = array();
@@ -33,6 +32,7 @@ class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTe
        /**
         * Variable container where ViewHelpers implementing the PostParseFacet can
         * store things in.
+        *
         * @var Tx_Fluid_Core_ViewHelper_TemplateVariableContainer
         */
        protected $variableContainer;
@@ -106,7 +106,7 @@ class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTe
         * @return Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode the top stack element.
         */
        public function getNodeFromStack() {
-               return $this->nodeStack[count($this->nodeStack)-1];
+               return $this->nodeStack[count($this->nodeStack) - 1];
        }
 
        /**
@@ -154,8 +154,8 @@ class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTe
 
        /**
         * Returns TRUE if the current template has a template defined via <f:layout name="..." />
-        * @see getLayoutName()
         *
+        * @see getLayoutName()
         * @return boolean
         */
        public function hasLayout() {
@@ -201,5 +201,7 @@ class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTe
        public function isCompiled() {
                return FALSE;
        }
+
 }
+
 ?>
\ No newline at end of file
index b3f4b54..59da3ac 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,15 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Abstract node in the syntax tree which has been built.
- *
  */
 abstract class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode implements Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface {
 
        /**
         * List of Child Nodes.
+        *
         * @var array<Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface>
         */
        protected $childNodes = array();
@@ -36,21 +34,20 @@ abstract class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode implements Tx_Fluid_
                        } else {
                                if (is_object($output)) {
                                        if (!method_exists($output, '__toString')) {
-                                               throw new Tx_Fluid_Core_Parser_Exception('Cannot cast object of type "' . get_class($output) . '" to string.', 1248356140);
+                                               throw new Tx_Fluid_Core_Parser_Exception(('Cannot cast object of type "' . get_class($output)) . '" to string.', 1248356140);
                                        }
                                        $output = $output->__toString();
                                } else {
-                                       $output = (string)$output;
+                                       $output = (string) $output;
                                }
                                $subNodeOutput = $subNode->evaluate($renderingContext);
-
                                if (is_object($subNodeOutput)) {
                                        if (!method_exists($subNodeOutput, '__toString')) {
-                                               throw new Tx_Fluid_Core_Parser_Exception('Cannot cast object of type "' . get_class($subNodeOutput) . '" to string.', 1273753083);
+                                               throw new Tx_Fluid_Core_Parser_Exception(('Cannot cast object of type "' . get_class($subNodeOutput)) . '" to string.', 1273753083);
                                        }
                                        $output .= $subNodeOutput->__toString();
                                } else {
-                                       $output .= (string)$subNodeOutput;
+                                       $output .= (string) $subNodeOutput;
                                }
                        }
                }
index 03c4b41..64d538c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,16 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Array Syntax Tree Node. Handles JSON-like arrays.
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
        /**
         * An associative array. Each key is a string. Each value is either a literal, or an AbstractNode.
+        *
         * @var array
         */
        protected $internalArray = array();
@@ -59,6 +56,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode extends Tx_Fluid_Core_Parser_Syn
        public function getInternalArray() {
                return $this->internalArray;
        }
+
 }
 
 ?>
\ No newline at end of file
index 926b1e9..e644b76 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,11 +8,8 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * A node which is used inside boolean arguments
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
@@ -23,6 +19,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
         * Make sure that if one string is contained in one another, the longer
         * string is listed BEFORE the shorter one.
         * Example: put ">=" before ">"
+        *
         * @var array
         */
        static protected $comparators = array('==', '!=', '%', '>=', '>', '<=', '<');
@@ -30,13 +27,14 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
        /**
         * A regular expression which checks the text nodes of a boolean expression.
         * Used to define how the regular expression language should look like.
+        *
         * @var string
         */
        static protected $booleanExpressionTextNodeCheckerRegularExpression = '/
                ^                 # Start with first input symbol
                (?:               # start repeat
                        COMPARATORS   # We allow all comparators
-                       |\s*          # Arbitary spaces
+                       |\\s*          # Arbitary spaces
                        |-?           # Numbers, possibly with the "minus" symbol in front.
                                [0-9]+    # some digits
                                (?:       # and optionally a dot, followed by some more digits
@@ -88,11 +86,10 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                if (count($childNodes) > 3) {
                        throw new Tx_Fluid_Core_Parser_Exception('A boolean expression has more than tree parts.', 1244201848);
                } elseif (count($childNodes) === 0) {
-                               // In this case, we do not have child nodes; i.e. the current SyntaxTreeNode
-                               // is a text node with a literal comparison like "1 == 1"
+                       // In this case, we do not have child nodes; i.e. the current SyntaxTreeNode
+                       // is a text node with a literal comparison like "1 == 1"
                        $childNodes = array($syntaxTreeNode);
                }
-
                $this->leftSide = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
                $this->rightSide = new Tx_Fluid_Core_Parser_SyntaxTree_RootNode();
                $this->comparator = NULL;
@@ -100,16 +97,14 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                        if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode && !preg_match(str_replace('COMPARATORS', implode('|', self::$comparators), self::$booleanExpressionTextNodeCheckerRegularExpression), $childNode->getText())) {
                                // $childNode is text node, and no comparator found.
                                $this->comparator = NULL;
-                                       // skip loop and fall back to classical to boolean conversion.
+                               // skip loop and fall back to classical to boolean conversion.
                                break;
                        }
-
                        if ($this->comparator !== NULL) {
-                                       // comparator already set, we are evaluating the right side of the comparator
+                               // comparator already set, we are evaluating the right side of the comparator
                                $this->rightSide->addChildNode($childNode);
-                       } elseif ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode
-                               && ($this->comparator = $this->getComparatorFromString($childNode->getText()))) {
-                                       // comparator in current string segment
+                       } elseif ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode && ($this->comparator = $this->getComparatorFromString($childNode->getText()))) {
+                               // comparator in current string segment
                                $explodedString = explode($this->comparator, $childNode->getText());
                                if (isset($explodedString[0]) && trim($explodedString[0]) !== '') {
                                        $this->leftSide->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode(trim($explodedString[0])));
@@ -118,11 +113,10 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                                        $this->rightSide->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode(trim($explodedString[1])));
                                }
                        } else {
-                                       // comparator not found yet, on the left side of the comparator
+                               // comparator not found yet, on the left side of the comparator
                                $this->leftSide->addChildNode($childNode);
                        }
                }
-
                if ($this->comparator === NULL) {
                        // No Comparator found, we need to evaluate the given syntax tree node manually
                        $this->syntaxTreeNode = $syntaxTreeNode;
@@ -179,12 +173,12 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
         *
         * Some special rules apply:
         * - The == and != operators are comparing the Object Identity using === and !==, when one of the two
-        *   operands are objects.
+        * operands are objects.
         * - For arithmetic comparisons (%, >, >=, <, <=), some special rules apply:
-        *   - arrays are only comparable with arrays, else the comparison yields FALSE
-        *   - objects are only comparable with objects, else the comparison yields FALSE
-        *   - the comparison is FALSE when two types are not comparable according to the table
-        *     "Comparison with various types" on http://php.net/manual/en/language.operators.comparison.php
+        * - arrays are only comparable with arrays, else the comparison yields FALSE
+        * - objects are only comparable with objects, else the comparison yields FALSE
+        * - the comparison is FALSE when two types are not comparable according to the table
+        * "Comparison with various types" on http://php.net/manual/en/language.operators.comparison.php
         *
         * This function must be static public, as it is also directly called from cached templates.
         *
@@ -194,37 +188,47 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
         */
        static public function evaluateComparator($comparator, $evaluatedLeftSide, $evaluatedRightSide) {
                switch ($comparator) {
-                       case '==':
-                               if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                                       return ($evaluatedLeftSide === $evaluatedRightSide);
-                               } else {
-                                       return ($evaluatedLeftSide == $evaluatedRightSide);
-                               }
-                               break;
-                       case '!=':
-                               if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                                       return ($evaluatedLeftSide !== $evaluatedRightSide);
-                               } else {
-                                       return ($evaluatedLeftSide != $evaluatedRightSide);
-                               }
-                               break;
-                       case '%':
-                               if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) return FALSE;
-                               return (boolean)((int)$evaluatedLeftSide % (int)$evaluatedRightSide);
-                       case '>':
-                               if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) return FALSE;
-                               return ($evaluatedLeftSide > $evaluatedRightSide);
-                       case '>=':
-                               if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) return FALSE;
-                               return ($evaluatedLeftSide >= $evaluatedRightSide);
-                       case '<':
-                               if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) return FALSE;
-                               return ($evaluatedLeftSide < $evaluatedRightSide);
-                       case '<=':
-                               if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) return FALSE;
-                               return ($evaluatedLeftSide <= $evaluatedRightSide);
-                       default:
-                               throw new Tx_Fluid_Core_Parser_Exception('Comparator "' . $comparator . '" is not implemented.', 1244234398);
+               case '==':
+                       if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
+                               return $evaluatedLeftSide === $evaluatedRightSide;
+                       } else {
+                               return $evaluatedLeftSide == $evaluatedRightSide;
+                       }
+                       break;
+               case '!=':
+                       if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
+                               return $evaluatedLeftSide !== $evaluatedRightSide;
+                       } else {
+                               return $evaluatedLeftSide != $evaluatedRightSide;
+                       }
+                       break;
+               case '%':
+                       if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
+                               return FALSE;
+                       }
+                       return (bool) ((int) $evaluatedLeftSide % (int) $evaluatedRightSide);
+               case '>':
+                       if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
+                               return FALSE;
+                       }
+                       return $evaluatedLeftSide > $evaluatedRightSide;
+               case '>=':
+                       if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
+                               return FALSE;
+                       }
+                       return $evaluatedLeftSide >= $evaluatedRightSide;
+               case '<':
+                       if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
+                               return FALSE;
+                       }
+                       return $evaluatedLeftSide < $evaluatedRightSide;
+               case '<=':
+                       if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
+                               return FALSE;
+                       }
+                       return $evaluatedLeftSide <= $evaluatedRightSide;
+               default:
+                       throw new Tx_Fluid_Core_Parser_Exception(('Comparator "' . $comparator) . '" is not implemented.', 1244234398);
                }
        }
 
@@ -237,15 +241,21 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
         * @return boolean TRUE if the operands can be compared using arithmetic operators, FALSE otherwise.
         */
        static protected function isComparable($evaluatedLeftSide, $evaluatedRightSide) {
-               if ((is_null($evaluatedLeftSide) || is_string($evaluatedLeftSide))
-                       && is_string($evaluatedRightSide)) return TRUE;
-               if (is_bool($evaluatedLeftSide) || is_null($evaluatedLeftSide)) return TRUE;
-               if (is_object($evaluatedLeftSide)
-                       && is_object($evaluatedRightSide)) return TRUE;
-               if ((is_string($evaluatedLeftSide) || is_resource($evaluatedLeftSide) || is_numeric($evaluatedLeftSide))
-                       && (is_string($evaluatedRightSide) || is_resource($evaluatedRightSide) || is_numeric($evaluatedRightSide))) return TRUE;
-               if (is_array($evaluatedLeftSide) && is_array($evaluatedRightSide)) return TRUE;
-
+               if ((is_null($evaluatedLeftSide) || is_string($evaluatedLeftSide)) && is_string($evaluatedRightSide)) {
+                       return TRUE;
+               }
+               if (is_bool($evaluatedLeftSide) || is_null($evaluatedLeftSide)) {
+                       return TRUE;
+               }
+               if (is_object($evaluatedLeftSide) && is_object($evaluatedRightSide)) {
+                       return TRUE;
+               }
+               if (((is_string($evaluatedLeftSide) || is_resource($evaluatedLeftSide)) || is_numeric($evaluatedLeftSide)) && ((is_string($evaluatedRightSide) || is_resource($evaluatedRightSide)) || is_numeric($evaluatedRightSide))) {
+                       return TRUE;
+               }
+               if (is_array($evaluatedLeftSide) && is_array($evaluatedRightSide)) {
+                       return TRUE;
+               }
                return FALSE;
        }
 
@@ -261,7 +271,6 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                                return $comparator;
                        }
                }
-
                return NULL;
        }
 
@@ -281,9 +290,9 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                        return $value > 0;
                }
                if (is_string($value)) {
-                       return (!empty($value) && strtolower($value) !== 'false');
+                       return !empty($value) && strtolower($value) !== 'false';
                }
-               if (is_array($value) || (is_object($value) && $value instanceof Countable)) {
+               if (is_array($value) || is_object($value) && $value instanceof Countable) {
                        return count($value) > 0;
                }
                if (is_object($value)) {
@@ -291,5 +300,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode extends Tx_Fluid_Core_Parser_S
                }
                return FALSE;
        }
+
 }
+
 ?>
\ No newline at end of file
index 3a7cfe3..2ec2b7c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,11 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Node in the syntax tree.
- *
  */
-interface Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface {
-
+interface Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface
+{
        /**
         * Evaluate all child nodes and return the evaluated results.
         *
@@ -46,6 +43,6 @@ interface Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface {
         * @return mixed Evaluated node
         */
        public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
-}
 
+}
 ?>
\ No newline at end of file
index cc725fb..a397bd7 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,16 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * A node which handles object access. This means it handles structures like {object.accessor.bla}
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
        /**
         * Object path which will be called. Is a list like "post.name.email"
+        *
         * @var string
         */
        protected $objectPath;
@@ -35,7 +32,6 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode extends Tx_Fluid_Core_P
                $this->objectPath = $objectPath;
        }
 
-
        /**
         * Internally used for building up cached templates; do not use directly!
         *
@@ -82,17 +78,18 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode extends Tx_Fluid_Core_P
                foreach ($propertyPathSegments as $pathSegment) {
                        $propertyExists = FALSE;
                        $propertyValue = Tx_Extbase_Reflection_ObjectAccess::getPropertyInternal($subject, $pathSegment, FALSE, $propertyExists);
-                       if ($propertyExists !== TRUE && (is_array($subject) || $subject instanceof ArrayAccess) && isset($subject[$pathSegment])) {
+                       if (($propertyExists !== TRUE && (is_array($subject) || $subject instanceof ArrayAccess)) && isset($subject[$pathSegment])) {
                                $subject = $subject[$pathSegment];
                        } else {
                                $subject = $propertyValue;
                        }
-
                        if ($subject instanceof Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface) {
                                $subject->setRenderingContext($renderingContext);
                        }
                }
                return $subject;
        }
+
 }
+
 ?>
\ No newline at end of file
index 4e5f0c3..0cb0fb4 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,15 +8,13 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Interface for objects which are aware of Fluid's rendering context. All objects
  * marked with this interface will get the current rendering context injected
  * by the ObjectAccessorNode on trying to evaluate them.
- *
  */
-interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface {
-
+interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface
+{
        /**
         * Sets the current rendering context
         *
@@ -27,5 +24,4 @@ interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface {
        public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
 
 }
-
 ?>
\ No newline at end of file
index ce91f8f..c8c96d9 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,11 +8,8 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Root node of every syntax tree.
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_RootNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
@@ -26,6 +22,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_RootNode extends Tx_Fluid_Core_Parser_Synt
        public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
                return $this->evaluateChildNodes($renderingContext);
        }
+
 }
 
 ?>
\ No newline at end of file
index 73151d4..7f9b113 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,16 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Text Syntax Tree Node - is a container for strings.
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_TextNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
        /**
         * Contents of the text node
+        *
         * @var string
         */
        protected $text;
@@ -30,7 +27,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNode extends Tx_Fluid_Core_Parser_Synt
         */
        public function __construct($text) {
                if (!is_string($text)) {
-                       throw new Tx_Fluid_Core_Parser_Exception('Text node requires an argument of type string, "' . gettype($text) . '" given.');
+                       throw new Tx_Fluid_Core_Parser_Exception(('Text node requires an argument of type string, "' . gettype($text)) . '" given.');
                }
                $this->text = $text;
        }
@@ -54,6 +51,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNode extends Tx_Fluid_Core_Parser_Synt
        public function getText() {
                return $this->text;
        }
+
 }
 
 ?>
\ No newline at end of file
index 4c9440d..8b4dc53 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,28 +8,28 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Node which will call a ViewHelper associated with this node.
- *
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 
        /**
         * Class name of view helper
+        *
         * @var string
         */
        protected $viewHelperClassName;
 
        /**
         * Arguments of view helper - References to RootNodes.
+        *
         * @var array
         */
        protected $arguments = array();
 
        /**
         * The ViewHelper associated with this node
+        *
         * @var Tx_Fluid_Core_ViewHelper_AbstractViewHelper
         */
        protected $uninitializedViewHelper = NULL;
@@ -38,12 +37,11 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
        /**
         * A mapping RenderingContext -> ViewHelper to only re-initialize ViewHelpers
         * when a context change occurs.
+        *
         * @var Tx_Extbase_Persistence_ObjectStorage
         */
        protected $viewHelpersByContext = NULL;
 
-
-
        /**
         * Constructor.
         *
@@ -107,10 +105,9 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
                        $viewHelper = clone $this->uninitializedViewHelper;
                        $this->viewHelpersByContext->attach($renderingContext, $viewHelper);
                }
-
                $evaluatedArguments = array();
                if (count($viewHelper->prepareArguments())) {
-                       foreach ($viewHelper->prepareArguments() as $argumentName => $argumentDefinition) {
+                       foreach ($viewHelper->prepareArguments() as $argumentName => $argumentDefinition) {
                                if (isset($this->arguments[$argumentName])) {
                                        $argumentValue = $this->arguments[$argumentName];
                                        $evaluatedArguments[$argumentName] = $argumentValue->evaluate($renderingContext);
@@ -119,17 +116,13 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
                                }
                        }
                }
-
                $viewHelper->setArguments($evaluatedArguments);
                $viewHelper->setViewHelperNode($this);
                $viewHelper->setRenderingContext($renderingContext);
-
                if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface) {
                        $viewHelper->setChildNodes($this->childNodes);
                }
-
                $output = $viewHelper->initializeArgumentsAndRender();
-
                return $output;
        }
 
@@ -141,6 +134,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
        public function __sleep() {
                return array('viewHelperClassName', 'arguments', 'childNodes');
        }
+
 }
 
 ?>
\ No newline at end of file
index 4278deb..2ad73ed 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,45 +8,41 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Template parser building up an object syntax tree
- *
  */
 class Tx_Fluid_Core_Parser_TemplateParser {
 
-       public static $SCAN_PATTERN_NAMESPACEDECLARATION = '/(?<!\\\\){namespace\s*([a-zA-Z]+[a-zA-Z0-9]*)\s*=\s*((?:Tx|t3lib|tslib)(?:FLUID_NAMESPACE_SEPARATOR\w+)+)\s*}/m';
+       static public $SCAN_PATTERN_NAMESPACEDECLARATION = '/(?<!\\\\){namespace\\s*([a-zA-Z]+[a-zA-Z0-9]*)\\s*=\\s*((?:Tx|t3lib|tslib)(?:FLUID_NAMESPACE_SEPARATOR\\w+)+)\\s*}/m';
 
        /**
         * This regular expression splits the input string at all dynamic tags, AND
         * on all <![CDATA[...]]> sections.
-        *
         */
-       public static $SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS = '/
+       static public $SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS = '/
                (
-                       (?: <\/?                                      # Start dynamic tags
+                       (?: <\\/?                                      # Start dynamic tags
                                        (?:(?:NAMESPACE):[a-zA-Z0-9\\.]+)     # A tag consists of the namespace prefix and word characters
                                        (?:                                   # Begin tag arguments
-                                               \s*[a-zA-Z0-9:]+                  # Argument Keys
+                                               \\s*[a-zA-Z0-9:]+                  # Argument Keys
                                                =                                 # =
                                                (?>                               # either... If we have found an argument, we will not back-track (That does the Atomic Bracket)
-                                                       "(?:\\\"|[^"])*"              # a double-quoted string
+                                                       "(?:\\\\"|[^"])*"              # a double-quoted string
                                                        |\'(?:\\\\\'|[^\'])*\'        # or a single quoted string
-                                               )\s*                              #
+                                               )\\s*                              #
                                        )*                                    # Tag arguments can be replaced many times.
-                               \s*
-                               \/?>                                      # Closing tag
+                               \\s*
+                               \\/?>                                      # Closing tag
                        )
                        |(?:                                          # Start match CDATA section
-                               <!\[CDATA\[.*?\]\]>
+                               <!\\[CDATA\\[.*?\\]\\]>
                        )
                )/xs';
 
        /**
         * This regular expression scans if the input string is a ViewHelper tag
-        *
         */
-       public static $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG = '/
+       static public $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG = '/
                ^<                                                # A Tag begins with <
                (?P<NamespaceIdentifier>NAMESPACE):               # Then comes the Namespace prefix followed by a :
                (?P<MethodIdentifier>                             # Now comes the Name of the ViewHelper
@@ -55,68 +50,64 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                )
                (?P<Attributes>                                   # Begin Tag Attributes
                        (?:                                           # A tag might have multiple attributes
-                               \s*
+                               \\s*
                                [a-zA-Z0-9:]+                             # The attribute name
                                =                                         # =
                                (?>                                       # either... # If we have found an argument, we will not back-track (That does the Atomic Bracket)
-                                       "(?:\\\"|[^"])*"                      # a double-quoted string
+                                       "(?:\\\\"|[^"])*"                      # a double-quoted string
                                        |\'(?:\\\\\'|[^\'])*\'                # or a single quoted string
                                )                                         #
-                               \s*
+                               \\s*
                        )*                                            # A tag might have multiple attributes
                )                                                 # End Tag Attributes
-               \s*
-               (?P<Selfclosing>\/?)                              # A tag might be selfclosing
+               \\s*
+               (?P<Selfclosing>\\/?)                              # A tag might be selfclosing
                >$/x';
 
        /**
         * This regular expression scans if the input string is a closing ViewHelper
         * tag.
-        *
         */
-       public static $SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG = '/^<\/(?P<NamespaceIdentifier>NAMESPACE):(?P<MethodIdentifier>[a-zA-Z0-9\\.]+)\s*>$/';
+       static public $SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG = '/^<\\/(?P<NamespaceIdentifier>NAMESPACE):(?P<MethodIdentifier>[a-zA-Z0-9\\.]+)\\s*>$/';
 
        /**
         * This regular expression splits the tag arguments into its parts
-        *
         */
-       public static $SPLIT_PATTERN_TAGARGUMENTS = '/
+       static public $SPLIT_PATTERN_TAGARGUMENTS = '/
                (?:                                              #
-                       \s*                                          #
+                       \\s*                                          #
                        (?P<Argument>                                # The attribute name
                                [a-zA-Z0-9:]+                            #
                        )                                            #
                        =                                            # =
                        (?>                                          # If we have found an argument, we will not back-track (That does the Atomic Bracket)
                                (?P<ValueQuoted>                         # either...
-                                       (?:"(?:\\\"|[^"])*")                 # a double-quoted string
+                                       (?:"(?:\\\\"|[^"])*")                 # a double-quoted string
                                        |(?:\'(?:\\\\\'|[^\'])*\')           # or a single quoted string
                                )
-                       )\s*
+                       )\\s*
                )
                /xs';
 
        /**
         * This pattern detects CDATA sections and outputs the text between opening
         * and closing CDATA.
-        *
         */
-       public static $SCAN_PATTERN_CDATA = '/^<!\[CDATA\[(.*?)\]\]>$/s';
+       static public $SCAN_PATTERN_CDATA = '/^<!\\[CDATA\\[(.*?)\\]\\]>$/s';
 
        /**
         * Pattern which splits the shorthand syntax into different tokens. The
         * "shorthand syntax" is everything like {...}
-        *
         */
-       public static $SPLIT_PATTERN_SHORTHANDSYNTAX = '/
+       static public $SPLIT_PATTERN_SHORTHANDSYNTAX = '/
                (
                        {                                # Start of shorthand syntax
                                (?:                          # Shorthand syntax is either composed of...
-                                       [a-zA-Z0-9\->_:,.()]     # Various characters
-                                       |"(?:\\\"|[^"])*"        # Double-quoted strings
+                                       [a-zA-Z0-9\\->_:,.()]     # Various characters
+                                       |"(?:\\\\"|[^"])*"        # Double-quoted strings
                                        |\'(?:\\\\\'|[^\'])*\'   # Single-quoted strings
                                        |(?R)                    # Other shorthand syntaxes inside, albeit not in a quoted string
-                                       |\s+                     # Spaces
+                                       |\\s+                     # Spaces
                                )+
                        }                                # End of shorthand syntax
                )/x';
@@ -128,37 +119,36 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         * {object.some.value->f:bla.blubb()->f:bla.blubb2()}
         *
         * THIS IS ALMOST THE SAME AS IN $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
-        *
         */
-       public static $SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS = '/
+       static public $SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS = '/
                ^{                                                      # Start of shorthand syntax
                                                                        # A shorthand syntax is either...
-                       (?P<Object>[a-zA-Z0-9\-_.]*)                                     # ... an object accessor
-                       \s*(?P<Delimiter>(?:->)?)\s*
+                       (?P<Object>[a-zA-Z0-9\\-_.]*)                                     # ... an object accessor
+                       \\s*(?P<Delimiter>(?:->)?)\\s*
 
                        (?P<ViewHelper>                                 # ... a ViewHelper
                                [a-zA-Z0-9]+                                # Namespace prefix of ViewHelper (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
                                :
                                [a-zA-Z0-9\\.]+                             # Method Identifier (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
-                               \(                                          # Opening parameter brackets of ViewHelper
+                               \\(                                          # Opening parameter brackets of ViewHelper
                                        (?P<ViewHelperArguments>                # Start submatch for ViewHelper arguments. This is taken from $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
                                                (?:
-                                                       \s*[a-zA-Z0-9\-_]+                  # The keys of the array
-                                                       \s*:\s*                             # Key|Value delimiter :
+                                                       \\s*[a-zA-Z0-9\\-_]+                  # The keys of the array
+                                                       \\s*:\\s*                             # Key|Value delimiter :
                                                        (?:                                 # Possible value options:
-                                                               "(?:\\\"|[^"])*"                # Double qouoted string
+                                                               "(?:\\\\"|[^"])*"                # Double qouoted string
                                                                |\'(?:\\\\\'|[^\'])*\'          # Single quoted string
-                                                               |[a-zA-Z0-9\-_.]+               # variable identifiers
+                                                               |[a-zA-Z0-9\\-_.]+               # variable identifiers
                                                                |{(?P>ViewHelperArguments)}     # Another sub-array
                                                        )                                   # END possible value options
-                                                       \s*,?                               # There might be a , to seperate different parts of the array
+                                                       \\s*,?                               # There might be a , to seperate different parts of the array
                                                )*                                  # The above cycle is repeated for all array elements
                                        )                                       # End ViewHelper Arguments submatch
-                               \)                                          # Closing parameter brackets of ViewHelper
+                               \\)                                          # Closing parameter brackets of ViewHelper
                        )?
                        (?P<AdditionalViewHelpers>                      # There can be more than one ViewHelper chained, by adding more -> and the ViewHelper (recursively)
                                (?:
-                                       \s*->\s*
+                                       \\s*->\\s*
                                        (?P>ViewHelper)
                                )*
                        )
@@ -166,28 +156,27 @@ class Tx_Fluid_Core_Parser_TemplateParser {
 
        /**
         * THIS IS ALMOST THE SAME AS $SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS
-        *
         */
-       public static $SPLIT_PATTERN_SHORTHANDSYNTAX_VIEWHELPER = '/
+       static public $SPLIT_PATTERN_SHORTHANDSYNTAX_VIEWHELPER = '/
 
                (?P<NamespaceIdentifier>[a-zA-Z0-9]+)       # Namespace prefix of ViewHelper (as in $SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG)
                :
                (?P<MethodIdentifier>[a-zA-Z0-9\\.]+)
-               \(                                          # Opening parameter brackets of ViewHelper
+               \\(                                          # Opening parameter brackets of ViewHelper
                        (?P<ViewHelperArguments>                # Start submatch for ViewHelper arguments. This is taken from $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS
                                (?:
-                                       \s*[a-zA-Z0-9\-_]+                  # The keys of the array
-                                       \s*:\s*                             # Key|Value delimiter :
+                                       \\s*[a-zA-Z0-9\\-_]+                  # The keys of the array
+                                       \\s*:\\s*                             # Key|Value delimiter :
                                        (?:                                 # Possible value options:
-                                               "(?:\\\"|[^"])*"                # Double qouoted string
+                                               "(?:\\\\"|[^"])*"                # Double qouoted string
                                                |\'(?:\\\\\'|[^\'])*\'          # Single quoted string
-                                               |[a-zA-Z0-9\-_.]+               # variable identifiers
+                                               |[a-zA-Z0-9\\-_.]+               # variable identifiers
                                                |{(?P>ViewHelperArguments)}     # Another sub-array
                                        )                                   # END possible value options
-                                       \s*,?                               # There might be a , to seperate different parts of the array
+                                       \\s*,?                               # There might be a , to seperate different parts of the array
                                )*                                  # The above cycle is repeated for all array elements
                        )                                       # End ViewHelper Arguments submatch
-               \)                                          # Closing parameter brackets of ViewHelper
+               \\)                                          # Closing parameter brackets of ViewHelper
                /x';
 
        /**
@@ -196,22 +185,21 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         * {object: value, object2: {nested: array}, object3: "Some string"}
         *
         * THIS IS ALMOST THE SAME AS IN SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS
-        *
         */
-       public static $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS = '/^
+       static public $SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS = '/^
                (?P<Recursion>                                  # Start the recursive part of the regular expression - describing the array syntax
                        {                                           # Each array needs to start with {
                                (?P<Array>                              # Start submatch
                                        (?:
-                                               \s*[a-zA-Z0-9\-_]+              # The keys of the array
-                                               \s*:\s*                         # Key|Value delimiter :
+                                               \\s*[a-zA-Z0-9\\-_]+              # The keys of the array
+                                               \\s*:\\s*                         # Key|Value delimiter :
                                                (?:                             # Possible value options:
-                                                       "(?:\\\"|[^"])*"            # Double qouoted string
+                                                       "(?:\\\\"|[^"])*"            # Double qouoted string
                                                        |\'(?:\\\\\'|[^\'])*\'      # Single quoted string
-                                                       |[a-zA-Z0-9\-_.]+           # variable identifiers
+                                                       |[a-zA-Z0-9\\-_.]+           # variable identifiers
                                                        |(?P>Recursion)             # Another sub-array
                                                )                               # END possible value options
-                                               \s*,?                           # There might be a , to seperate different parts of the array
+                                               \\s*,?                           # There might be a , to seperate different parts of the array
                                        )*                                  # The above cycle is repeated for all array elements
                                )                                       # End array submatch
                        }                                           # Each array ends with }
@@ -220,26 +208,26 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        /**
         * This pattern splits an array into its parts. It is quite similar to the
         * pattern above.
-        *
         */
-       public static $SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS = '/
+       static public $SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS = '/
                (?P<ArrayPart>                                             # Start submatch
-                       (?P<Key>[a-zA-Z0-9\-_]+)                               # The keys of the array
-                       \s*:\s*                                                   # Key|Value delimiter :
+                       (?P<Key>[a-zA-Z0-9\\-_]+)                               # The keys of the array
+                       \\s*:\\s*                                                   # Key|Value delimiter :
                        (?:                                                       # Possible value options:
                                (?P<QuotedString>                                     # Quoted string
-                                       (?:"(?:\\\"|[^"])*")
+                                       (?:"(?:\\\\"|[^"])*")
                                        |(?:\'(?:\\\\\'|[^\'])*\')
                                )
-                               |(?P<VariableIdentifier>[a-zA-Z][a-zA-Z0-9\-_.]*)    # variable identifiers have to start with a letter
+                               |(?P<VariableIdentifier>[a-zA-Z][a-zA-Z0-9\\-_.]*)    # variable identifiers have to start with a letter
                                |(?P<Number>[0-9.]+)                                  # Number
-                               |{\s*(?P<Subarray>(?:(?P>ArrayPart)\s*,?\s*)+)\s*}              # Another sub-array
+                               |{\\s*(?P<Subarray>(?:(?P>ArrayPart)\\s*,?\\s*)+)\\s*}              # Another sub-array
                        )                                                         # END possible value options
                )                                                          # End array part submatch
        /x';
 
        /**
         * Namespace identifiers and their component name prefix (Associative array).
+        *
         * @var array
         */
        protected $namespaces = array(
@@ -259,7 +247,6 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        /**
         * Constructor. Preprocesses the $SCAN_PATTERN_NAMESPACEDECLARATION by
         * inserting the correct namespace separator.
-        *
         */
        public function __construct() {
                self::$SCAN_PATTERN_NAMESPACEDECLARATION = str_replace('FLUID_NAMESPACE_SEPARATOR', preg_quote(Tx_Fluid_Fluid::NAMESPACE_SEPARATOR), self::$SCAN_PATTERN_NAMESPACEDECLARATION);
@@ -297,19 +284,17 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         * @return Tx_Fluid_Core_Parser_ParsedTemplateInterface Parsed template
         */
        public function parse($templateString) {
-               if (!is_string($templateString)) throw new Tx_Fluid_Core_Parser_Exception('Parse requires a template string as argument, ' . gettype($templateString) . ' given.', 1224237899);
-
+               if (!is_string($templateString)) {
+                       throw new Tx_Fluid_Core_Parser_Exception(('Parse requires a template string as argument, ' . gettype($templateString)) . ' given.', 1224237899);
+               }
                $this->reset();
-
                $templateString = $this->extractNamespaceDefinitions($templateString);
                $splitTemplate = $this->splitTemplateAtDynamicTags($templateString);
                $parsingState = $this->buildObjectTree($splitTemplate);
-
                $variableContainer = $parsingState->getVariableContainer();
                if ($variableContainer !== NULL && $variableContainer->exists('layoutName')) {
                        $parsingState->setLayoutNameNode($variableContainer->get('layoutName'));
                }
-
                return $parsingState;
        }
 
@@ -347,11 +332,10 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                                $namespaceIdentifier = $matchedVariables[1][$index];
                                $fullyQualifiedNamespace = $matchedVariables[2][$index];
                                if (key_exists($namespaceIdentifier, $this->namespaces)) {
-                                       throw new Tx_Fluid_Core_Parser_Exception('Namespace identifier "' . $namespaceIdentifier . '" is already registered. Do not redeclare namespaces!', 1224241246);
+                                       throw new Tx_Fluid_Core_Parser_Exception(('Namespace identifier "' . $namespaceIdentifier) . '" is already registered. Do not redeclare namespaces!', 1224241246);
                                }
                                $this->namespaces[$namespaceIdentifier] = $fullyQualifiedNamespace;
                        }
-
                        $templateString = preg_replace(self::$SCAN_PATTERN_NAMESPACEDECLARATION, '', $templateString);
                }
                return $templateString;
@@ -377,25 +361,22 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        protected function buildObjectTree($splitTemplate) {
                $regularExpression_openingViewHelperTag = $this->prepareTemplateRegularExpression(self::$SCAN_PATTERN_TEMPLATE_VIEWHELPERTAG);
                $regularExpression_closingViewHelperTag = $this->prepareTemplateRegularExpression(self::$SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG);
-
                $state = $this->objectManager->create('Tx_Fluid_Core_Parser_ParsingState');
                $rootNode = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_RootNode');
                $state->setRootNode($rootNode);
                $state->pushNodeToStack($rootNode);
-
                foreach ($splitTemplate as $templateElement) {
                        $matchedVariables = array();
                        if (preg_match(self::$SCAN_PATTERN_CDATA, $templateElement, $matchedVariables) > 0) {
                                $this->textHandler($state, $matchedVariables[1]);
                        } elseif (preg_match($regularExpression_openingViewHelperTag, $templateElement, $matchedVariables) > 0) {
-                               $this->openingViewHelperTagHandler($state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier'], $matchedVariables['Attributes'], ($matchedVariables['Selfclosing'] === '' ? FALSE : TRUE));
+                               $this->openingViewHelperTagHandler($state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier'], $matchedVariables['Attributes'], $matchedVariables['Selfclosing'] === '' ? FALSE : TRUE);
                        } elseif (preg_match($regularExpression_closingViewHelperTag, $templateElement, $matchedVariables) > 0) {
                                $this->closingViewHelperTagHandler($state, $matchedVariables['NamespaceIdentifier'], $matchedVariables['MethodIdentifier']);
                        } else {
                                $this->textAndShorthandSyntaxHandler($state, $templateElement);
                        }
                }
-
                if ($state->countNodeStack() !== 1) {
                        throw new Tx_Fluid_Core_Parser_Exception('Not all tags were closed!', 1238169398);
                }
@@ -415,7 +396,6 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        protected function openingViewHelperTagHandler(Tx_Fluid_Core_Parser_ParsingState $state, $namespaceIdentifier, $methodIdentifier, $arguments, $selfclosing) {
                $argumentsObjectTree = $this->parseArguments($arguments);
                $this->initializeViewHelperAndAddItToStack($state, $namespaceIdentifier, $methodIdentifier, $argumentsObjectTree);
-
                if ($selfclosing) {
                        $node = $state->popNodeFromStack();
                        $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
@@ -437,30 +417,23 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                        throw new Tx_Fluid_Core_Parser_Exception('Namespace could not be resolved. This exception should never be thrown!', 1224254792);
                }
                $viewHelper = $this->objectManager->get($this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier));
-
-                       // The following three checks are only done *in an uncached template*, and not needed anymore in the cached version
+               // The following three checks are only done *in an uncached template*, and not needed anymore in the cached version
                $expectedViewHelperArguments = $viewHelper->prepareArguments();
                $this->abortIfUnregisteredArgumentsExist($expectedViewHelperArguments, $argumentsObjectTree);
                $this->abortIfRequiredArgumentsAreMissing($expectedViewHelperArguments, $argumentsObjectTree);
                $this->rewriteBooleanNodesInArgumentsObjectTree($expectedViewHelperArguments, $argumentsObjectTree);
-
                $currentViewHelperNode = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', $viewHelper, $argumentsObjectTree);
-
                $state->getNodeFromStack()->addChildNode($currentViewHelperNode);
-
-               if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface && !($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface)) {
+               if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface && !$viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface) {
                        $state->setCompilable(FALSE);
                }
-
-                       // PostParse Facet
+               // PostParse Facet
                if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_PostParseInterface) {
                        // Don't just use $viewHelper::postParseEvent(...),
                        // as this will break with PHP < 5.3.
                        call_user_func(array($viewHelper, 'postParseEvent'), $currentViewHelperNode, $argumentsObjectTree, $state->getVariableContainer());
                }
-
                $this->callInterceptor($currentViewHelperNode, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER, $state);
-
                $state->pushNodeToStack($currentViewHelperNode);
        }
 
@@ -477,10 +450,9 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                foreach ($expectedArguments as $expectedArgument) {
                        $expectedArgumentNames[] = $expectedArgument->getName();
                }
-
                foreach (array_keys($actualArguments) as $argumentName) {
                        if (!in_array($argumentName, $expectedArgumentNames)) {
-                               throw new Tx_Fluid_Core_Parser_Exception('Argument "' . $argumentName . '" was not registered.', 1237823695);
+                               throw new Tx_Fluid_Core_Parser_Exception(('Argument "' . $argumentName) . '" was not registered.', 1237823695);
                        }
                }
        }
@@ -496,7 +468,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                $actualArgumentNames = array_keys($actualArguments);
                foreach ($expectedArguments as $expectedArgument) {
                        if ($expectedArgument->isRequired() && !in_array($expectedArgument->getName(), $actualArgumentNames)) {
-                               throw new Tx_Fluid_Core_Parser_Exception('Required argument "' . $expectedArgument->getName() . '" was not supplied.', 1237823699);
+                               throw new Tx_Fluid_Core_Parser_Exception(('Required argument "' . $expectedArgument->getName()) . '" was not supplied.', 1237823699);
                        }
                }
        }
@@ -520,7 +492,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         * Resolve a viewhelper name.
         *
         * @param string $namespaceIdentifier Namespace identifier for the view helper.
-        * @param string $methodIdentifier Method identifier, might be hierarchical like "link.url"
+        * @param string $methodIdentifier Method identifier, might be hierarchical like "link.url
         * @return string The fully qualified class name of the viewhelper
         */
        protected function resolveViewHelperName($namespaceIdentifier, $methodIdentifier) {
@@ -531,9 +503,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                        $className = ucfirst($explodedViewHelperName[0]);
                }
                $className .= 'ViewHelper';
-
-               $name = $this->namespaces[$namespaceIdentifier] . Tx_Fluid_Fluid::NAMESPACE_SEPARATOR . $className;
-
+               $name = ($this->namespaces[$namespaceIdentifier] . Tx_Fluid_Fluid::NAMESPACE_SEPARATOR) . $className;
                return $name;
        }
 
@@ -551,11 +521,11 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                        throw new Tx_Fluid_Core_Parser_Exception('Namespace could not be resolved. This exception should never be thrown!', 1224256186);
                }
                $lastStackElement = $state->popNodeFromStack();
-               if (!($lastStackElement instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode)) {
+               if (!$lastStackElement instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode) {
                        throw new Tx_Fluid_Core_Parser_Exception('You closed a templating tag which you never opened!', 1224485838);
                }
                if ($lastStackElement->getViewHelperClassName() != $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier)) {
-                       throw new Tx_Fluid_Core_Parser_Exception('Templating tags not properly nested. Expected: ' . $lastStackElement->getViewHelperClassName() . '; Actual: ' . $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier), 1224485398);
+                       throw new Tx_Fluid_Core_Parser_Exception((('Templating tags not properly nested. Expected: ' . $lastStackElement->getViewHelperClassName()) . '; Actual: ') . $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier), 1224485398);
                }
                $this->callInterceptor($lastStackElement, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
        }
@@ -576,23 +546,19 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        protected function objectAccessorHandler(Tx_Fluid_Core_Parser_ParsingState $state, $objectAccessorString, $delimiter, $viewHelperString, $additionalViewHelpersString) {
                $viewHelperString .= $additionalViewHelpersString;
                $numberOfViewHelpers = 0;
-
-                       // The following post-processing handles a case when there is only a ViewHelper, and no Object Accessor.
-                       // Resolves bug #5107.
+               // The following post-processing handles a case when there is only a ViewHelper, and no Object Accessor.
+               // Resolves bug #5107.
                if (strlen($delimiter) === 0 && strlen($viewHelperString) > 0) {
                        $viewHelperString = $objectAccessorString . $viewHelperString;
                        $objectAccessorString = '';
                }
-
-                       // ViewHelpers
+               // ViewHelpers
                $matches = array();
                if (strlen($viewHelperString) > 0 && preg_match_all(self::$SPLIT_PATTERN_SHORTHANDSYNTAX_VIEWHELPER, $viewHelperString, $matches, PREG_SET_ORDER) > 0) {
-                               // The last ViewHelper has to be added first for correct chaining.
+                       // The last ViewHelper has to be added first for correct chaining.
                        foreach (array_reverse($matches) as $singleMatch) {
                                if (strlen($singleMatch['ViewHelperArguments']) > 0) {
-                                       $arguments = $this->postProcessArgumentsForObjectAccessor(
-                                               $this->recursiveArrayHandler($singleMatch['ViewHelperArguments'])
-                                       );
+                                       $arguments = $this->postProcessArgumentsForObjectAccessor($this->recursiveArrayHandler($singleMatch['ViewHelperArguments']));
                                } else {
                                        $arguments = array();
                                }
@@ -600,18 +566,14 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                                $numberOfViewHelpers++;
                        }
                }
-
-                       // Object Accessor
+               // Object Accessor
                if (strlen($objectAccessorString) > 0) {
-
                        $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode', $objectAccessorString);
                        $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OBJECTACCESSOR, $state);
-
                        $state->getNodeFromStack()->addChildNode($node);
                }
-
-                       // Close ViewHelper Tags if needed.
-               for ($i=0; $i<$numberOfViewHelpers; $i++) {
+               // Close ViewHelper Tags if needed.
+               for ($i = 0; $i < $numberOfViewHelpers; $i++) {
                        $node = $state->popNodeFromStack();
                        $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
                }
@@ -633,7 +595,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                        // TODO: Clean up this.
                        $interceptors = $this->configuration->getInterceptors($interceptionPoint);
                        if (count($interceptors) > 0) {
-                               foreach($interceptors as $interceptor) {
+                               foreach ($interceptors as $interceptor) {
                                        $node = $interceptor->process($node, $interceptionPoint, $state);
                                }
                        }
@@ -650,8 +612,8 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         */
        protected function postProcessArgumentsForObjectAccessor(array $arguments) {
                foreach ($arguments as $argumentName => $argumentValue) {
-                       if (!($argumentValue instanceof Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode)) {
-                               $arguments[$argumentName] = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', (string)$argumentValue);
+                       if (!$argumentValue instanceof Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode) {
+                               $arguments[$argumentName] = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', (string) $argumentValue);
                        }
                }
                return $arguments;
@@ -712,11 +674,11 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         */
        protected function unquoteString($quotedValue) {
                switch ($quotedValue[0]) {
-                       case '"':
-                               $value = str_replace('\"', '"', trim($quotedValue, '"'));
+               case '"':
+                       $value = str_replace('\\"', '"', trim($quotedValue, '"'));
                        break;
-                       case "'":
-                               $value = str_replace("\'", "'", trim($quotedValue, "'"));
+               case '\'':
+                       $value = str_replace('\\\'', '\'', trim($quotedValue, '\''));
                        break;
                }
                return str_replace('\\\\', '\\', $value);
@@ -745,11 +707,10 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         */
        protected function textAndShorthandSyntaxHandler(Tx_Fluid_Core_Parser_ParsingState $state, $text) {
                $sections = preg_split($this->prepareTemplateRegularExpression(self::$SPLIT_PATTERN_SHORTHANDSYNTAX), $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
-
                foreach ($sections as $section) {
                        $matchedVariables = array();
                        if (preg_match(self::$SCAN_PATTERN_SHORTHANDSYNTAX_OBJECTACCESSORS, $section, $matchedVariables) > 0) {
-                               $this->objectAccessorHandler($state, $matchedVariables['Object'], $matchedVariables['Delimiter'], (isset($matchedVariables['ViewHelper'])?$matchedVariables['ViewHelper']:''), (isset($matchedVariables['AdditionalViewHelpers'])?$matchedVariables['AdditionalViewHelpers']:''));
+                               $this->objectAccessorHandler($state, $matchedVariables['Object'], $matchedVariables['Delimiter'], isset($matchedVariables['ViewHelper']) ? $matchedVariables['ViewHelper'] : '', isset($matchedVariables['AdditionalViewHelpers']) ? $matchedVariables['AdditionalViewHelpers'] : '');
                        } elseif (preg_match(self::$SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS, $section, $matchedVariables) > 0) {
                                $this->arrayHandler($state, $matchedVariables['Array']);
                        } else {
@@ -767,9 +728,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
         * @return void
         */
        protected function arrayHandler(Tx_Fluid_Core_Parser_ParsingState $state, $arrayText) {
-               $state->getNodeFromStack()->addChildNode(
-                       $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode', $this->recursiveArrayHandler($arrayText))
-               );
+               $state->getNodeFromStack()->addChildNode($this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode', $this->recursiveArrayHandler($arrayText)));
        }
 
        /**
@@ -793,15 +752,15 @@ class Tx_Fluid_Core_Parser_TemplateParser {
                                $arrayKey = $singleMatch['Key'];
                                if (!empty($singleMatch['VariableIdentifier'])) {
                                        $arrayToBuild[$arrayKey] = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode', $singleMatch['VariableIdentifier']);
-                               } elseif (array_key_exists('Number', $singleMatch) && ( !empty($singleMatch['Number']) || $singleMatch['Number'] === '0' ) ) {
+                               } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) {
                                        $arrayToBuild[$arrayKey] = floatval($singleMatch['Number']);
-                               } elseif ( ( array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']) ) ) {
+                               } elseif (array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString'])) {
                                        $argumentString = $this->unquoteString($singleMatch['QuotedString']);
                                        $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString);
-                               } elseif ( array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {
+                               } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {
                                        $arrayToBuild[$arrayKey] = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode', $this->recursiveArrayHandler($singleMatch['Subarray']));
                                } else {
-                                       throw new Tx_Fluid_Core_Parser_Exception('This exception should never be thrown, as the array value has to be of some type (Value given: "' . var_export($singleMatch, TRUE) . '"). Please post your template to the bugtracker at forge.typo3.org.', 1225136013);
+                                       throw new Tx_Fluid_Core_Parser_Exception(('This exception should never be thrown, as the array value has to be of some type (Value given: "' . var_export($singleMatch, TRUE)) . '"). Please post your template to the bugtracker at forge.typo3.org.', 1225136013);
                                }
                        }
                        return $arrayToBuild;
@@ -820,9 +779,9 @@ class Tx_Fluid_Core_Parser_TemplateParser {
        protected function textHandler(Tx_Fluid_Core_Parser_ParsingState $state, $text) {
                $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', $text);
                $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_TEXT, $state);
-
                $state->getNodeFromStack()->addChildNode($node);
        }
 
 }
+
 ?>
\ No newline at end of file
index baa0f60..ad36799 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,11 +8,8 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
- *
- *
+
  */
 class Tx_Fluid_Core_Rendering_RenderingContext implements Tx_Fluid_Core_Rendering_RenderingContextInterface {
 
@@ -119,5 +115,7 @@ class Tx_Fluid_Core_Rendering_RenderingContext implements Tx_Fluid_Core_Renderin
        public function getViewHelperVariableContainer() {
                return $this->viewHelperVariableContainer;
        }
+
 }
+
 ?>
\ No newline at end of file
index b054a6d..354bb03 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,11 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
- *
- *
- */
-interface Tx_Fluid_Core_Rendering_RenderingContextInterface {
 
+ */
+interface Tx_Fluid_Core_Rendering_RenderingContextInterface
+{
        /**
         * Get the template variable container
         *
@@ -36,5 +33,6 @@ interface Tx_Fluid_Core_Rendering_RenderingContextInterface {
         * @return Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer
         */
        public function getViewHelperVariableContainer();
+
 }
 ?>
\ No newline at end of file
index aba68f4..f20de62 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,32 +8,18 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * This view helper is an abstract ViewHelper which implements an if/else condition.
- * @see Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode::convertArgumentValue() to find see how boolean arguments are evaluated
- *
- * = Usage =
- *
- * To create a custom Condition ViewHelper, you need to subclass this class, and
- * implement your own render() method. Inside there, you should call $this->renderThenChild()
- * if the condition evaluated to TRUE, and $this->renderElseChild() if the condition evaluated
- * to FALSE.
- *
- * Every Condition ViewHelper has a "then" and "else" argument, so it can be used like:
- * <[aConditionViewHelperName] .... then="condition true" else="condition false" />,
- * or as well use the "then" and "else" child nodes.
  *
+ * @see Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode::convertArgumentValue() to find see how boolean arguments are evaluated
  * @see Tx_Fluid_ViewHelpers_IfViewHelper for a more detailed explanation and a simple usage example.
- * Make sure to NOT OVERRIDE the constructor.
- *
  * @api
  */
 abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface, Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface {
 
        /**
         * An array of Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode
+        *
         * @var array
         */
        private $childNodes = array();
@@ -51,7 +36,6 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_F
 
        /**
         * Initializes the "then" and "else" arguments
-        *
         */
        public function __construct() {
                $this->registerArgument('then', 'mixed', 'Value to be returned if the condition if met.', FALSE);
@@ -76,20 +60,16 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_F
                } elseif ($this->hasArgument('__elseClosure') || $this->hasArgument('else')) {
                        return '';
                }
-
                $elseViewHelperEncountered = FALSE;
                foreach ($this->childNodes as $childNode) {
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
+                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
                                $data = $childNode->evaluate($this->renderingContext);
                                return $data;
                        }
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
+                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
                                $elseViewHelperEncountered = TRUE;
                        }
                }
-
                if ($elseViewHelperEncountered) {
                        return '';
                } else {
@@ -114,12 +94,10 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_F
                        return $elseClosure();
                }
                foreach ($this->childNodes as $childNode) {
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
+                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
                                return $childNode->evaluate($this->renderingContext);
                        }
                }
-
                return '';
        }
 
@@ -137,21 +115,18 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_F
         */
        public function compile($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, Tx_Fluid_Core_Compiler_TemplateCompiler $templateCompiler) {
                foreach ($syntaxTreeNode->getChildNodes() as $childNode) {
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
-
+                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
                                $childNodesAsClosure = $templateCompiler->wrapChildNodesInClosure($childNode);
                                $initializationPhpCode .= sprintf('%s[\'__thenClosure\'] = %s;', $argumentsVariableName, $childNodesAsClosure) . chr(10);
                        }
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-                               && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
-
+                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode && $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
                                $childNodesAsClosure = $templateCompiler->wrapChildNodesInClosure($childNode);
                                $initializationPhpCode .= sprintf('%s[\'__elseClosure\'] = %s;', $argumentsVariableName, $childNodesAsClosure) . chr(10);
                        }
                }
                return Tx_Fluid_Core_Compiler_TemplateCompiler::SHOULD_GENERATE_VIEWHELPER_INVOCATION;
        }
+
 }
 
 ?>
\ No newline at end of file
index 922007c..ff3b7ba 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,8 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Tag based view helper.
  * Sould be used as the base class for all view helpers which output simple tags, as it provides some
@@ -22,6 +19,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper extends Tx_Fl
 
        /**
         * Names of all registered tag attributes
+        *
         * @var array
         */
        static private $tagAttributes = array();
@@ -78,7 +76,6 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper extends Tx_Fl
                if ($this->hasArgument('additionalAttributes') && is_array($this->arguments['additionalAttributes'])) {
                        $this->tag->addAttributes($this->arguments['additionalAttributes']);
                }
-
                if (isset(self::$tagAttributes[get_class($this)])) {
                        foreach (self::$tagAttributes[get_class($this)] as $attributeName) {
                                if ($this->hasArgument($attributeName) && $this->arguments[$attributeName] !== '') {
@@ -122,5 +119,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper extends Tx_Fl
                $this->registerTagAttribute('tabindex', 'integer', 'Specifies the tab order of this element');
                $this->registerTagAttribute('onclick', 'string', 'JavaScript evaluated for the onclick event');
        }
+
 }
+
 ?>
\ No newline at end of file
index d7bb36b..d750c1c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,8 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * The abstract base class for all view helpers.
  *
@@ -20,12 +17,14 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * TRUE if arguments have already been initialized
+        *
         * @var boolean
         */
        private $argumentsInitialized = FALSE;
 
        /**
         * Stores all Tx_Fluid_ArgumentDefinition instances
+        *
         * @var array
         */
        private $argumentDefinitions = array();
@@ -36,18 +35,21 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         *
         * In our benchmarks, this cache leads to a 40% improvement when using a certain
         * ViewHelper class many times throughout the rendering process.
+        *
         * @var array
         */
        static private $argumentDefinitionCache = array();
 
        /**
         * Current view helper node
+        *
         * @var Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
         */
        private $viewHelperNode;
 
        /**
         * Arguments array.
+        *
         * @var array
         * @api
         */
@@ -55,6 +57,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * Current variable container reference.
+        *
         * @var Tx_Fluid_Core_ViewHelper_TemplateVariableContainer
         * @api
         */
@@ -62,6 +65,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * Controller Context to use
+        *
         * @var Tx_Extbase_MVC_Controller_ControllerContext
         * @api
         */
@@ -80,6 +84,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * ViewHelper Variable Container
+        *
         * @var Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer
         * @api
         */
@@ -87,6 +92,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * Reflection service
+        *
         * @var Tx_Extbase_Reflection_Service
         */
        private $reflectionService;
@@ -94,6 +100,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
        /**
         * With this flag, you can disable the escaping interceptor inside this ViewHelper.
         * THIS MIGHT CHANGE WITHOUT NOTICE, NO PUBLIC API!
+        *
         * @var boolean
         * @internal
         */
@@ -122,6 +129,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
        /**
         * Inject a Reflection service
+        *
         * @param Tx_Extbase_Reflection_Service $reflectionService Reflection service
         */
        public function injectReflectionService(Tx_Extbase_Reflection_Service $reflectionService) {
@@ -154,7 +162,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         */
        protected function registerArgument($name, $type, $description, $required = FALSE, $defaultValue = NULL) {
                if (array_key_exists($name, $this->argumentDefinitions)) {
-                       throw new Tx_Fluid_Core_ViewHelper_Exception('Argument "' . $name . '" has already been defined, thus it should not be defined again.', 1253036401);
+                       throw new Tx_Fluid_Core_ViewHelper_Exception(('Argument "' . $name) . '" has already been defined, thus it should not be defined again.', 1253036401);
                }
                $this->argumentDefinitions[$name] = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($name, $type, $description, $required, $defaultValue);
                return $this;
@@ -163,8 +171,8 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
        /**
         * Overrides a registered argument. Call this method from your ViewHelper subclass
         * inside the initializeArguments() method if you want to override a previously registered argument.
-        * @see registerArgument()
         *
+        * @see registerArgument()
         * @param string $name Name of the argument
         * @param string $type Type of the argument
         * @param string $description Description of the argument
@@ -175,7 +183,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         */
        protected function overrideArgument($name, $type, $description, $required = FALSE, $defaultValue = NULL) {
                if (!array_key_exists($name, $this->argumentDefinitions)) {
-                       throw new Tx_Fluid_Core_ViewHelper_Exception('Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', 1279212461);
+                       throw new Tx_Fluid_Core_ViewHelper_Exception(('Argument "' . $name) . '" has not been defined, thus it can\'t be overridden.', 1279212461);
                }
                $this->argumentDefinitions[$name] = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($name, $type, $description, $required, $defaultValue);
                return $this;
@@ -212,7 +220,6 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
        public function initializeArgumentsAndRender() {
                $this->validateArguments();
                $this->initialize();
-
                return $this->callRenderMethod();
        }
 
@@ -228,11 +235,10 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
                                $renderMethodParameters[$argumentName] = $this->arguments[$argumentName];
                        }
                }
-
                try {
                        return call_user_func_array(array($this, 'render'), $renderMethodParameters);
                } catch (Tx_Fluid_Core_ViewHelper_Exception $exception) {
-                               // @todo [BW] rethrow exception, log, ignore.. depending on the current context
+                       // @todo [BW] rethrow exception, log, ignore.. depending on the current context
                        return $exception->getMessage();
                }
        }
@@ -246,6 +252,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         * @api
         */
        public function initialize() {
+
        }
 
        /**
@@ -274,7 +281,9 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         */
        protected function buildRenderChildrenClosure() {
                $self = $this;
-               return function() use ($self) { return $self->renderChildren(); };
+               return function () use($self) {
+                       return $self->renderChildren();
+               };
        }
 
        /**
@@ -307,16 +316,13 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
                if (count($methodParameters) === 0) {
                        return;
                }
-
                if (Tx_Fluid_Fluid::$debugMode) {
                        $methodTags = $this->reflectionService->getMethodTagsValues(get_class($this), 'render');
-
                        $paramAnnotations = array();
                        if (isset($methodTags['param'])) {
                                $paramAnnotations = $methodTags['param'];
                        }
                }
-
                $i = 0;
                foreach ($methodParameters as $parameterName => $parameterInfo) {
                        $dataType = NULL;
@@ -326,9 +332,8 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
                                $dataType = 'array';
                        }
                        if ($dataType === NULL) {
-                               throw new Tx_Fluid_Core_Parser_Exception('could not determine type of argument "' . $parameterName .'" of the render-method in ViewHelper "' . get_class($this) . '". Either the methods docComment is invalid or some PHP optimizer strips off comments.', 1242292003);
+                               throw new Tx_Fluid_Core_Parser_Exception(((('could not determine type of argument "' . $parameterName) . '" of the render-method in ViewHelper "') . get_class($this)) . '". Either the methods docComment is invalid or some PHP optimizer strips off comments.', 1242292003);
                        }
-
                        $description = '';
                        if (Tx_Fluid_Fluid::$debugMode && isset($paramAnnotations[$i])) {
                                $explodedAnnotation = explode(' ', $paramAnnotations[$i]);
@@ -340,7 +345,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
                        if (isset($parameterInfo['defaultValue'])) {
                                $defaultValue = $parameterInfo['defaultValue'];
                        }
-                       $this->argumentDefinitions[$parameterName] = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($parameterName, $dataType, $description, ($parameterInfo['optional'] === FALSE), $defaultValue, TRUE);
+                       $this->argumentDefinitions[$parameterName] = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($parameterName, $dataType, $description, $parameterInfo['optional'] === FALSE, $defaultValue, TRUE);
                        $i++;
                }
        }
@@ -352,27 +357,29 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         */
        public function validateArguments() {
                $argumentDefinitions = $this->prepareArguments();
-               if (!count($argumentDefinitions)) return;
-
+               if (!count($argumentDefinitions)) {
+                       return;
+               }
                foreach ($argumentDefinitions as $argumentName => $registeredArgument) {
                        if ($this->hasArgument($argumentName)) {
                                $type = $registeredArgument->getType();
-                               if ($this->arguments[$argumentName] === $registeredArgument->getDefaultValue()) continue;
-
+                               if ($this->arguments[$argumentName] === $registeredArgument->getDefaultValue()) {
+                                       continue;
+                               }
                                if ($type === 'array') {
-                                       if (!is_array($this->arguments[$argumentName]) && !$this->arguments[$argumentName] instanceof ArrayAccess && !$this->arguments[$argumentName] instanceof Traversable) {
-                                               throw new InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "array", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '"', 1237900529);
+                                       if ((!is_array($this->arguments[$argumentName]) && !$this->arguments[$argumentName] instanceof ArrayAccess) && !$this->arguments[$argumentName] instanceof Traversable) {
+                                               throw new InvalidArgumentException(((((('The argument "' . $argumentName) . '" was registered with type "array", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '"', 1237900529);
                                        }
                                } elseif ($type === 'boolean') {
                                        if (!is_bool($this->arguments[$argumentName])) {
-                                               throw new InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "boolean", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1240227732);
+                                               throw new InvalidArgumentException(((((('The argument "' . $argumentName) . '" was registered with type "boolean", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1240227732);
                                        }
                                } elseif (class_exists($type, FALSE)) {
-                                       if (! ($this->arguments[$argumentName] instanceof $type)) {
+                                       if (!$this->arguments[$argumentName] instanceof $type) {
                                                if (is_object($this->arguments[$argumentName])) {
-                                                       throw new InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "' . $type . '", but is of type "' . get_class($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1256475114);
+                                                       throw new InvalidArgumentException(((((((('The argument "' . $argumentName) . '" was registered with type "') . $type) . '", but is of type "') . get_class($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1256475114);
                                                } else {
-                                                       throw new InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "' . $type . '", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1256475113);
+                                                       throw new InvalidArgumentException(((((((('The argument "' . $argumentName) . '" was registered with type "') . $type) . '", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1256475113);
                                                }
                                        }
                                }
@@ -388,6 +395,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         * @api
         */
        public function initializeArguments() {
+
        }
 
        /**
@@ -400,7 +408,6 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         * @api
         */
        //abstract public function render();
-
        /**
         * Get the rendering context interface.
         *
@@ -440,8 +447,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         * @see Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface
         */
        public function compile($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, Tx_Fluid_Core_Compiler_TemplateCompiler $templateCompiler) {
-               return sprintf('%s::renderStatic(%s, %s, $renderingContext)',
-                               get_class($this), $argumentsVariableName, $renderChildrenClosureVariableName);
+               return sprintf('%s::renderStatic(%s, %s, $renderingContext)', get_class($this), $argumentsVariableName, $renderChildrenClosureVariableName);
        }
 
        /**
@@ -467,7 +473,9 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
         * @return void
         */
        public function resetState() {
+
        }
+
 }
 
 ?>
\ No newline at end of file
index 03d59bf..2999e24 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,45 +8,49 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Argument definition of each view helper argument
- *
  */
 class Tx_Fluid_Core_ViewHelper_ArgumentDefinition {
 
        /**
         * Name of argument
+        *
         * @var string
         */
        protected $name;
 
        /**
         * Type of argument
+        *
         * @var string
         */
        protected $type;
 
        /**
         * Description of argument
+        *
         * @var string
         */
        protected $description;
 
        /**
         * Is argument required?
+        *
         * @var boolean
         */
        protected $required = FALSE;
 
        /**
         * Default value for argument
+        *
         * @var mixed
         */
        protected $defaultValue = NULL;
 
        /**
         * TRUE if it is a method parameter
+        *
         * @var boolean
         */
        protected $isMethodParameter = FALSE;
@@ -124,6 +127,7 @@ class Tx_Fluid_Core_ViewHelper_ArgumentDefinition {
        public function isMethodParameter() {
                return $this->isMethodParameter;
        }
+
 }
 
 ?>
\ No newline at end of file
index 857f635..0b043e2 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -19,7 +18,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Arguments list. Wraps an array, but only allows read-only methods on it.
  * Is available inside every view helper as $this->arguments - and you use it as if it was an array.
@@ -64,7 +62,6 @@ class Tx_Fluid_Core_ViewHelper_Arguments implements ArrayAccess {
                if (!array_key_exists($key, $this->arguments)) {
                        return NULL;
                }
-
                return $this->arguments[$key];
        }
 
@@ -75,7 +72,7 @@ class Tx_Fluid_Core_ViewHelper_Arguments implements ArrayAccess {
         * @param object $value
         */
        public function offsetSet($key, $value) {
-               throw new Tx_Fluid_Core_Exception('Tried to set argument "' . $key . '", but setting arguments is forbidden.', 1236080693);
+               throw new Tx_Fluid_Core_Exception(('Tried to set argument "' . $key) . '", but setting arguments is forbidden.', 1236080693);
        }
 
        /**
@@ -84,7 +81,7 @@ class Tx_Fluid_Core_ViewHelper_Arguments implements ArrayAccess {
         * @param string $key
         */
        public function offsetUnset($key) {
-               throw new Tx_Fluid_Core_Exception('Tried to unset argument "' . $key . '", but setting arguments is forbidden.', 1236080702);
+               throw new Tx_Fluid_Core_Exception(('Tried to unset argument "' . $key) . '", but setting arguments is forbidden.', 1236080702);
        }
 
        /**
@@ -97,5 +94,7 @@ class Tx_Fluid_Core_ViewHelper_Arguments implements ArrayAccess {
        public function hasArgument($argumentName) {
                return $this->offsetExists($argumentName) && $this->arguments[$argumentName] !== NULL;
        }
+
 }
+
 ?>
\ No newline at end of file
index a31481c..75a8d32 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,12 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A ViewHelper Exception
  *
  * @api
  */
 class Tx_Fluid_Core_ViewHelper_Exception extends Tx_Fluid_Core_Exception {
+
+
 }
+
 ?>
\ No newline at end of file
index 28a222d..a0c703d 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A "Invalid Variable" exception.
  *
  * @api
  */
 class Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException extends Tx_Fluid_Core_ViewHelper_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 225c585..fdb3e5b 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A "Rendering Context not Accessible" exception.
  *
  * @api
  */
 class Tx_Fluid_Core_ViewHelper_Exception_RenderingContextNotAccessibleException extends Tx_Fluid_Core_ViewHelper_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 117c12d..c3159c5 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,7 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Child Node Access Facet. View Helpers should implement this interface if they
  * need access to the direct children in the Syntax Tree at rendering-time.
@@ -21,9 +19,9 @@
  * Right now it is only used internally for conditions, so by subclassing Tx_Fluid_Core_ViewHelpers_AbstractConditionViewHelper, this should be all you need.
  *
  * See Tx_Fluid_ViewHelpers_IfViewHelper for an example how it is used.
- *
  */
-interface Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
+interface Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface
+{
        /**
         * Sets the direct child nodes of the current syntax tree node.
         *
@@ -31,6 +29,6 @@ interface Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
         * @return void
         */
        public function setChildNodes(array $childNodes);
-}
 
+}
 ?>
\ No newline at end of file
index ee2cac9..34e062a 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,7 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * If a ViewHelper implements CompilableInterface, it can directly influence the way
  * the syntax tree is compiled to a static PHP file.
@@ -44,8 +42,8 @@
  * A ViewHelper which wants to directly influence the resulting PHP code must implement
  * the CompilableInterface, and only implement the compile() method.
  */
-interface Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface {
-
+interface Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface
+{
        /**
         * Here follows a more detailed description of the arguments of this function:
         *
@@ -98,6 +96,6 @@ interface Tx_Fluid_Core_ViewHelper_Facets_CompilableInterface {
         * @return string
         */
        public function compile($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, Tx_Fluid_Core_Compiler_TemplateCompiler $templateCompiler);
-}
 
+}
 ?>
\ No newline at end of file
index 0633fc3..a20ccdc 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,7 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Post Parse Facet. Your view helper should implement this if you want a callback
  * to be called directly after the syntax tree node corresponding to this view
  * in case you implement this facet.
  *
  * Normally, this facet is not needed, except in really really rare cases.
- *
  */
-interface Tx_Fluid_Core_ViewHelper_Facets_PostParseInterface {
-
+interface Tx_Fluid_Core_ViewHelper_Facets_PostParseInterface
+{
        /**
         * Callback which is called directly after the corresponding syntax tree
         * node to this view helper has been built.
@@ -42,5 +39,4 @@ interface Tx_Fluid_Core_ViewHelper_Facets_PostParseInterface {
        static public function postParseEvent(Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode $syntaxTreeNode, array $viewHelperArguments, Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer);
 
 }
-
 ?>
\ No newline at end of file
index 03d43d7..0011d24 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
- * @deprecated. Extend Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper instead!
- *
+ * @deprecated . Extend Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper instead!
  * @api
  */
 abstract class Tx_Fluid_Core_ViewHelper_TagBasedViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
        /**
         * Constructor
-        *
         */
        public function __construct() {
-               t3lib_div::deprecationLog('the ViewHelper "' . get_class($this) . '" extends "Tx_Fluid_Core_ViewHelper_TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper"');
+               t3lib_div::deprecationLog(('the ViewHelper "' . get_class($this)) . '" extends "Tx_Fluid_Core_ViewHelper_TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper"');
                parent::__construct();
        }
+
 }
+
 ?>
\ No newline at end of file
index e411a23..716f0e8 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,8 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * Tag builder. Can be easily accessed in AbstractTagBasedViewHelper
  *
@@ -150,7 +147,7 @@ class Tx_Fluid_Core_ViewHelper_TagBuilder {
         * @api
         */
        public function addAttributes(array $attributes, $escapeSpecialCharacters = TRUE) {
-               foreach($attributes as $attributeName => $attributeValue) {
+               foreach ($attributes as $attributeName => $attributeValue) {
                        $this->addAttribute($attributeName, $attributeValue, $escapeSpecialCharacters);
                }
        }
@@ -190,15 +187,17 @@ class Tx_Fluid_Core_ViewHelper_TagBuilder {
                        return '';
                }
                $output = '<' . $this->tagName;
-               foreach($this->attributes as $attributeName => $attributeValue) {
-                       $output .= ' ' . $attributeName . '="' . $attributeValue . '"';
+               foreach ($this->attributes as $attributeName => $attributeValue) {
+                       $output .= (((' ' . $attributeName) . '="') . $attributeValue) . '"';
                }
                if ($this->hasContent() || $this->forceClosingTag) {
-                       $output .= '>' . $this->content . '</' . $this->tagName . '>';
+                       $output .= ((('>' . $this->content) . '</') . $this->tagName) . '>';
                } else {
                        $output .= ' />';
                }
                return $output;
        }
+
 }
+
 ?>
\ No newline at end of file
index a366e48..c11d101 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,8 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * VariableContainer which stores template variables.
  * Is used in two contexts:
@@ -24,12 +21,14 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
 
        /**
         * List of reserved words that can't be used as variable identifiers in Fluid templates
+        *
         * @var array
         */
        static protected $reservedVariableNames = array('true', 'false', 'on', 'off', 'yes', 'no', '_all');
 
        /**
         * Variables stored in context
+        *
         * @var array
         */
        protected $variables = array();
@@ -53,8 +52,12 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
         * @api
         */
        public function add($identifier, $value) {
-               if (array_key_exists($identifier, $this->variables)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('Duplicate variable declarations!', 1224479063);
-               if (in_array(strtolower($identifier), self::$reservedVariableNames)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('"' . $identifier . '" is a reserved variable name and can\'t be used as variable identifier.', 1256730379);
+               if (array_key_exists($identifier, $this->variables)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('Duplicate variable declarations!', 1224479063);
+               }
+               if (in_array(strtolower($identifier), self::$reservedVariableNames)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(('"' . $identifier) . '" is a reserved variable name and can\'t be used as variable identifier.', 1256730379);
+               }
                $this->variables[$identifier] = $value;
        }
 
@@ -69,7 +72,9 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
                if ($identifier === '_all') {
                        return $this->variables;
                }
-               if (!array_key_exists($identifier, $this->variables)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('Tried to get a variable "' . $identifier . '" which is not stored in the context!', 1224479370);
+               if (!array_key_exists($identifier, $this->variables)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(('Tried to get a variable "' . $identifier) . '" which is not stored in the context!', 1224479370);
+               }
                return $this->variables[$identifier];
        }
 
@@ -81,7 +86,9 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
         * @api
         */
        public function remove($identifier) {
-               if (!array_key_exists($identifier, $this->variables)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('Tried to remove a variable "' . $identifier . '" which is not stored in the context!', 1224479372);
+               if (!array_key_exists($identifier, $this->variables)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(('Tried to remove a variable "' . $identifier) . '" which is not stored in the context!', 1224479372);
+               }
                unset($this->variables[$identifier]);
        }
 
@@ -114,7 +121,6 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
                if ($identifier === '_all') {
                        return TRUE;
                }
-
                return array_key_exists($identifier, $this->variables);
        }
 
@@ -167,5 +173,7 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
        public function offsetGet($identifier) {
                return $this->get($identifier);
        }
+
 }
+
 ?>
\ No newline at end of file
index d5b9c36..43963c1 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
+
  */
-interface Tx_Fluid_Core_ViewHelper_ViewHelperInterface {
+interface Tx_Fluid_Core_ViewHelper_ViewHelperInterface
+{
 
 }
-
 ?>
\ No newline at end of file
index 7e86699..214cc1c 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,8 +8,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
-
 /**
  * @api
  */
@@ -19,12 +16,12 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
        /**
         * Two-dimensional object array storing the values. The first dimension is the fully qualified ViewHelper name,
         * and the second dimension is the identifier for the data the ViewHelper wants to store.
+        *
         * @var array
         */
        protected $objects = array();
 
        /**
-        *
         * @var Tx_Fluid_View_AbstractTemplateView
         */
        protected $view;
@@ -43,7 +40,9 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
         * @api
         */
        public function add($viewHelperName, $key, $value) {
-               if ($this->exists($viewHelperName, $key)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('The key "' . $viewHelperName . '->' . $key . '" was already stored and you cannot override it.', 1243352010);
+               if ($this->exists($viewHelperName, $key)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(((('The key "' . $viewHelperName) . '->') . $key) . '" was already stored and you cannot override it.', 1243352010);
+               }
                $this->addOrUpdate($viewHelperName, $key, $value);
        }
 
@@ -74,7 +73,9 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
         * @api
         */
        public function get($viewHelperName, $key) {
-               if (!$this->exists($viewHelperName, $key)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('No value found for key "' . $viewHelperName . '->' . $key . '"', 1243325768);
+               if (!$this->exists($viewHelperName, $key)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(((('No value found for key "' . $viewHelperName) . '->') . $key) . '"', 1243325768);
+               }
                return $this->objects[$viewHelperName][$key];
        }
 
@@ -100,7 +101,9 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
         * @api
         */
        public function remove($viewHelperName, $key) {
-               if (!$this->exists($viewHelperName, $key)) throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException('No value found for key "' . $viewHelperName . '->' . $key . '", thus the key cannot be removed.', 1243352249);
+               if (!$this->exists($viewHelperName, $key)) {
+                       throw new Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException(((('No value found for key "' . $viewHelperName) . '->') . $key) . '", thus the key cannot be removed.', 1243352249);
+               }
                unset($this->objects[$viewHelperName][$key]);
        }
 
@@ -133,5 +136,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
        public function __sleep() {
                return array('objects');
        }
+
 }
+
 ?>
\ No newline at end of file
index bafc2fc..a34bcea 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -19,7 +18,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * This is the base class for all widget controllers.
  * Basically, it is an ActionController, and it additionally
@@ -65,13 +63,11 @@ abstract class Tx_Fluid_Core_Widget_AbstractWidgetController extends Tx_Extbase_
        protected function setViewConfiguration(Tx_Extbase_MVC_View_ViewInterface $view) {
                $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
                $widgetViewHelperClassName = $this->request->getWidgetContext()->getWidgetViewHelperClassName();
-
-               if (isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath'])
-                       && strlen($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']) > 0
-                       && method_exists($view, 'setTemplateRootPath')) {
+               if ((isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']) && strlen($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']) > 0) && method_exists($view, 'setTemplateRootPath')) {
                        $view->setTemplateRootPath(t3lib_div::getFileAbsFileName($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']));
                }
        }
+
 }
 
 ?>
\ No newline at end of file
index d57c157..df1254d 100644 (file)
@@ -1,6 +1,7 @@
 <?php
-declare(ENCODING = 'utf-8') ;
+declare (ENCODING = 'utf-8') {
 
+}
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -20,7 +21,6 @@ declare(ENCODING = 'utf-8') ;
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * @api
  */
@@ -98,7 +98,6 @@ abstract class Tx_Fluid_Core_Widget_AbstractWidgetViewHelper extends Tx_Fluid_Co
                $this->validateArguments();
                $this->initialize();
                $this->initializeWidgetContext();
-
                return $this->callRenderMethod();
        }
 
@@ -110,17 +109,14 @@ abstract class Tx_Fluid_Core_Widget_AbstractWidgetViewHelper extends Tx_Fluid_Co
        private function initializeWidgetContext() {
                $this->widgetContext->setWidgetConfiguration($this->getWidgetConfiguration());
                $this->initializeWidgetIdentifier();
-
-               $controllerObjectName = ($this->controller instanceof Tx_Fluid_AOP_ProxyInterface) ? $this->controller->FLOW3_AOP_Proxy_getProxyTargetClassName() : get_class($this->controller);
+               $controllerObjectName = $this->controller instanceof Tx_Fluid_AOP_ProxyInterface ? $this->controller->FLOW3_AOP_Proxy_getProxyTargetClassName() : get_class($this->controller);
                $this->widgetContext->setControllerObjectName($controllerObjectName);
-
                $extensionName = $this->controllerContext->getRequest()->getControllerExtensionName();
                $pluginName = $this->controllerContext->getRequest()->getPluginName();
                $this->widgetContext->setParentExtensionName($extensionName);
                $this->widgetContext->setParentPluginName($pluginName);
                $pluginNamespace = $this->extensionService->getPluginNamespace($extensionName, $pluginName);
                $this->widgetContext->setParentPluginNamespace($pluginNamespace);
-
                $this->widgetContext->setWidgetViewHelperClassName(get_class($this));
                if ($this->ajaxWidget === TRUE) {
                        $this->ajaxWidgetContextHolder->store($this->widgetContext);
@@ -160,17 +156,15 @@ abstract class Tx_Fluid_Core_Widget_AbstractWidgetViewHelper extends Tx_Fluid_Co
         * @api
         */
        protected function initiateSubRequest() {
-               if (!($this->controller instanceof Tx_Fluid_Core_Widget_AbstractWidgetController)) {
+               if (!$this->controller instanceof Tx_Fluid_Core_Widget_AbstractWidgetController) {
                        if (isset($this->controller)) {
-                               throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException('initiateSubRequest() can not be called if there is no valid controller extending Tx_Fluid_Core_Widget_AbstractWidgetController. Got "' . get_class($this->controller) . '" in class "' . get_class($this) . '".', 1289422564);
+                               throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException(((('initiateSubRequest() can not be called if there is no valid controller extending Tx_Fluid_Core_Widget_AbstractWidgetController. Got "' . get_class($this->controller)) . '" in class "') . get_class($this)) . '".', 1289422564);
                        }
-                       throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException('initiateSubRequest() can not be called if there is no controller inside $this->controller. Make sure to add a corresponding injectController method to your WidgetViewHelper class "' . get_class($this) . '".', 1284401632);
+                       throw new Tx_Fluid_Core_Widget_Exception_MissingControllerException(('initiateSubRequest() can not be called if there is no controller inside $this->controller. Make sure to add a corresponding injectController method to your WidgetViewHelper class "' . get_class($this)) . '".', 1284401632);
                }
-
                $subRequest = $this->objectManager->create('Tx_Fluid_Core_Widget_WidgetRequest');
                $subRequest->setWidgetContext($this->widgetContext);
                $this->passArgumentsToSubRequest($subRequest);
-
                $subResponse = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');
                $this->controller->processRequest($subRequest, $subResponse);
                return $subResponse;
@@ -210,9 +204,9 @@ abstract class Tx_Fluid_Core_Widget_AbstractWidgetViewHelper extends Tx_Fluid_Co
                }
                $widgetIdentifier = '@widget_' . $widgetCounter;
                $this->viewHelperVariableContainer->addOrUpdate('Tx_Fluid_Core_Widget_AbstractWidgetViewHelper', 'nextWidgetNumber', $widgetCounter + 1);
-
                $this->widgetContext->setWidgetIdentifier($widgetIdentifier);
        }
+
 }
 
 ?>
\ No newline at end of file
index fe0cdb9..64d025b 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * This object stores the WidgetContext for the currently active widgets
  * of the current user, to make sure the WidgetContext is available in
  * Widget AJAX requests.
  *
  * This class is only used internally by the widget framework.
- *
  */
 class Tx_Fluid_Core_Widget_AjaxWidgetContextHolder implements t3lib_Singleton {
 
@@ -72,7 +69,7 @@ class Tx_Fluid_Core_Widget_AjaxWidgetContextHolder implements t3lib_Singleton {
         */
        public function get($ajaxWidgetId) {
                if (!isset($this->widgetContexts[$ajaxWidgetId])) {
-                       throw new Tx_Fluid_Core_Widget_Exception_WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775);
+                       throw new Tx_Fluid_Core_Widget_Exception_WidgetContextNotFoundException(('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId) . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775);
                }
                return $this->widgetContexts[$ajaxWidgetId];
        }
@@ -93,21 +90,19 @@ class Tx_Fluid_Core_Widget_AjaxWidgetContextHolder implements t3lib_Singleton {
 
        /**
         * Persists the widget contexts in the TYPO3 user session
+        *
         * @return void
         */
        protected function storeWidgetContexts() {
                if (TYPO3_MODE === 'FE') {
-                       $GLOBALS['TSFE']->fe_user->setKey(
-                               'ses',
-                               $this->widgetContextsStorageKey,
-                               serialize($this->widgetContexts)
-                       );
+                       $GLOBALS['TSFE']->fe_user->setKey('ses', $this->widgetContextsStorageKey, serialize($this->widgetContexts));
                        $GLOBALS['TSFE']->fe_user->storeSessionData();
                } else {
                        $GLOBALS['BE_USER']->uc[$this->widgetContextsStorageKey] = serialize($this->widgetContexts);
                        $GLOBALS['BE_USER']->writeUc();
                }
        }
+
 }
 
 ?>
\ No newline at end of file
index 4cdf56e..287fa11 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * This is the bootstrap for Ajax Widget responses
- *
  */
 class Tx_Fluid_Core_Widget_Bootstrap {
 
@@ -49,12 +46,10 @@ class Tx_Fluid_Core_Widget_Bootstrap {
                $this->initializeConfiguration($configuration);
                $this->configureObjectManager();
                $ajaxWidgetContextHolder = $this->objectManager->get('Tx_Fluid_Core_Widget_AjaxWidgetContextHolder');
-
                $widgetIdentifier = t3lib_div::_GET('fluid-widget-id');
                $widgetContext = $ajaxWidgetContextHolder->get($widgetIdentifier);
                $configuration['extensionName'] = $widgetContext->getParentExtensionName();
                $configuration['pluginName'] = $widgetContext->getParentPluginName();
-
                $extbaseBootstrap = $this->objectManager->get('Tx_Extbase_Core_Bootstrap');
                $extbaseBootstrap->cObj = $this->cObj;
                return $extbaseBootstrap->run($content, $configuration);
@@ -94,6 +89,7 @@ class Tx_Fluid_Core_Widget_Bootstrap {
                        }
                }
        }
+
 }
 
 ?>
\ No newline at end of file
index 80476c2..2dbeea9 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A Fluid Widget exception.
  *
  * @api
  */
 class Tx_Fluid_Core_Widget_Exception extends Tx_Fluid_Core_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 17bff51..032c407 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An exception if the controller is missing.
- *
  */
 class Tx_Fluid_Core_Widget_Exception_MissingControllerException extends Tx_Fluid_Core_Widget_Exception {
+
+
 }
+
 ?>
\ No newline at end of file
index c906edb..3a150ef 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An exception if no widget context could be found inside the AjaxWidgetContextHolder.
- *
  */
 class Tx_Fluid_Core_Widget_Exception_RenderingContextNotFoundException extends Tx_Fluid_Core_Widget_Exception {
+
+
 }
+
 ?>
\ No newline at end of file
index d56c65f..cc9447d 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An exception if no widget context could be found inside the AjaxWidgetContextHolder.
- *
  */
 class Tx_Fluid_Core_Widget_Exception_WidgetContextNotFoundException extends Tx_Fluid_Core_Widget_Exception {
+
+
 }
+
 ?>
\ No newline at end of file
index 2644370..f6f9a3b 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An exception if no widget Request could be found inside <f:renderChildren>.
- *
  */
 class Tx_Fluid_Core_Widget_Exception_WidgetRequestNotFoundException extends Tx_Fluid_Core_Widget_Exception {
+
+
 }
+
 ?>
\ No newline at end of file
index 3a693d5..0dcf189 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -19,7 +18,6 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * The WidgetContext stores all information a widget needs to know about the
  * environment.
@@ -30,7 +28,6 @@
  * to get knowledge over the current widget's configuration.
  *
  * It is a purely internal class which should not be used outside of Fluid.
- *
  */
 class Tx_Fluid_Core_Widget_WidgetContext {
 
@@ -70,8 +67,9 @@ class Tx_Fluid_Core_Widget_WidgetContext {
         * @var Tx_Fluid_Core_Parser_SyntaxTree_RootNode
         * @transient
         */
-       protected $viewHelperChildNodes; // TODO: rename to something more meaningful.
+       protected $viewHelperChildNodes;
 
+       // TODO: rename to something more meaningful.
        /**
         * The rendering context of the ViewHelperChildNodes.
         * Only available inside non-AJAX requests.
@@ -267,5 +265,7 @@ class Tx_Fluid_Core_Widget_WidgetContext {
        public function __sleep() {
                return array('widgetIdentifier', 'ajaxWidgetIdentifier', 'widgetConfiguration', 'controllerObjectName', 'parentPluginNamespace', 'parentExtensionName', 'parentPluginName', 'widgetViewHelperClassName');
        }
+
 }
+
 ?>
\ No newline at end of file
index 594fe73..901c2b1 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Represents a widget request.
- *
  */
 class Tx_Fluid_Core_Widget_WidgetRequest extends Tx_Extbase_MVC_Web_Request {
 
@@ -53,7 +50,9 @@ class Tx_Fluid_Core_Widget_WidgetRequest extends Tx_Extbase_MVC_Web_Request {
         * @return string
         */
        public function getArgumentPrefix() {
-               return $this->widgetContext->getParentPluginNamespace() . '[' . $this->widgetContext->getWidgetIdentifier() . ']';
+               return (($this->widgetContext->getParentPluginNamespace() . '[') . $this->widgetContext->getWidgetIdentifier()) . ']';
        }
+
 }
+
 ?>
\ No newline at end of file
index cded010..7ccb555 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Builds the WidgetRequest if an AJAX widget is called.
- *
  */
 class Tx_Fluid_Core_Widget_WidgetRequestBuilder extends Tx_Extbase_MVC_Web_RequestBuilder {
 
@@ -48,23 +45,22 @@ class Tx_Fluid_Core_Widget_WidgetRequestBuilder extends Tx_Extbase_MVC_Web_Reque
                $request = $this->objectManager->create('Tx_Fluid_Core_Widget_WidgetRequest');
                $request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
                $request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
-               $request->setMethod((isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : NULL);
+               $request->setMethod(isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : NULL);
                if (strtolower($_SERVER['REQUEST_METHOD']) === 'post') {
                        $request->setArguments(t3lib_div::_POST());
                } else {
                        $request->setArguments(t3lib_div::_GET());
                }
-
                $rawGetArguments = t3lib_div::_GET();
-                       // TODO: rename to @action, to be consistent with normal naming?
+               // TODO: rename to @action, to be consistent with normal naming?
                if (isset($rawGetArguments['action'])) {
                        $request->setControllerActionName($rawGetArguments['action']);
                }
-
                $widgetContext = $this->ajaxWidgetContextHolder->get($rawGetArguments['fluid-widget-id']);
                $request->setWidgetContext($widgetContext);
                return $request;
        }
+
 }
 
 ?>
\ No newline at end of file
index d56e74d..e7048a8 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Widget request handler, which handles the request if
  * f3-fluid-widget-id is found.
  *
  * This Request Handler gets the WidgetRequestBuilder injected.
- *
  */
 class Tx_Fluid_Core_Widget_WidgetRequestHandler extends Tx_Extbase_MVC_Web_AbstractRequestHandler {
 
@@ -76,7 +73,6 @@ class Tx_Fluid_Core_Widget_WidgetRequestHandler extends Tx_Extbase_MVC_Web_Abstr
                        $request->setContentObjectData($this->cObj->data);
                }
                $response = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');
-
                $this->dispatcher->dispatch($request, $response);
                return $response;
        }
@@ -97,6 +93,7 @@ class Tx_Fluid_Core_Widget_WidgetRequestHandler extends Tx_Extbase_MVC_Web_Abstr
        public function getPriority() {
                return 200;
        }
+
 }
 
 ?>
\ No newline at end of file
index bc54149..be486e0 100644 (file)
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  *                                                                        */
-
 /**
+
  */
 class Tx_Fluid_Exception extends Exception {
 
-}
 
+}
 
 ?>
\ No newline at end of file
index acacc52..07f8b68 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is part of the TYPO3 project - inspiring people to share!  *
  *                                                                        *
  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
  * Public License for more details.                                       *
  *                                                                        */
-
 /**
+
  */
 class Tx_Fluid_Fluid {
+
        const NAMESPACE_SEPARATOR = '_';
+       static public $debugMode = FALSE;
 
-       public static $debugMode = FALSE;
 }
 
-
 ?>
\ No newline at end of file
index 244809c..62b500e 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,11 +8,9 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * XML Schema (XSD) Generator. Will generate an XML schema which can be used for autocompletion
  * in schema-aware editors like Eclipse XML editor.
- *
  */
 class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerator {
 
@@ -27,9 +24,7 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
                if (substr($namespace, -1) !== Tx_Fluid_Fluid::NAMESPACE_SEPARATOR) {
                        $namespace .= Tx_Fluid_Fluid::NAMESPACE_SEPARATOR;
                }
-
                $classNames = $this->getClassNamesInNamespace($namespace);
-
                $xmlRootNode = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>
 <section version="5.0" xmlns="http://docbook.org/ns/docbook"
          xml:id="fluid.usermanual.standardviewhelpers"
@@ -43,11 +38,9 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
 
     <para>Should be autogenerated from the tags.</para>
 </section>');
-
                foreach ($classNames as $className) {
                        $this->generateXmlForClassName($className, $namespace, $xmlRootNode);
                }
-
                return $xmlRootNode->asXML();
        }
 
@@ -64,19 +57,14 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
                if (!$reflectionClass->isSubclassOf($this->abstractViewHelperReflectionClass)) {
                        return;
                }
-
                $tagName = $this->getTagNameForClass($className, $namespace);
-
                $docbookSection = $xmlRootNode->addChild('section');
-
                $docbookSection->addChild('title', $tagName);
                $this->docCommentParser->parseDocComment($reflectionClass->getDocComment());
                $this->addDocumentation($this->docCommentParser->getDescription(), $docbookSection);
-
                $argumentsSection = $docbookSection->addChild('section');
                $argumentsSection->addChild('title', 'Arguments');
                $this->addArguments($className, $argumentsSection);
-
                return $docbookSection;
        }
 
@@ -91,7 +79,6 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
        protected function addArguments($className, SimpleXMLElement $docbookSection) {
                $viewHelper = $this->instanciateViewHelper($className);
                $argumentDefinitions = $viewHelper->prepareArguments();
-
                if (count($argumentDefinitions) === 0) {
                        $docbookSection->addChild('para', 'No arguments defined.');
                        return;
@@ -101,11 +88,9 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
                $tgroup = $argumentsTable->addChild('tgroup');
                $tgroup['cols'] = 4;
                $this->addArgumentTableRow($tgroup->addChild('thead'), 'Name', 'Type', 'Required', 'Description', 'Default');
-
                $tbody = $tgroup->addChild('tbody');
-
                foreach ($argumentDefinitions as $argumentDefinition) {
-                       $this->addArgumentTableRow($tbody, $argumentDefinition->getName(), $argumentDefinition->getType(), ($argumentDefinition->isRequired()?'yes':'no'), $argumentDefinition->getDescription(), $argumentDefinition->getDefaultValue());
+                       $this->addArgumentTableRow($tbody, $argumentDefinition->getName(), $argumentDefinition->getType(), $argumentDefinition->isRequired() ? 'yes' : 'no', $argumentDefinition->getDescription(), $argumentDefinition->getDefaultValue());
                }
        }
 
@@ -130,12 +115,11 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
         */
        private function addArgumentTableRow(SimpleXMLElement $parent, $name, $type, $required, $description, $default) {
                $row = $parent->addChild('row');
-
                $row->addChild('entry', $name);
                $row->addChild('entry', $type);
                $row->addChild('entry', $required);
                $row->addChild('entry', $description);
-               $row->addChild('entry', (string)$default);
+               $row->addChild('entry', (string) $default);
        }
 
        /**
@@ -151,11 +135,9 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
         * @return void
         */
        protected function addDocumentation($documentation, SimpleXMLElement $docbookSection) {
-               $splitRegex = '/^\s*(=[^=]+=)$/m';
-               $regex = '/^\s*(=([^=]+)=)$/m';
-
-               $matches = preg_split($splitRegex, $documentation, -1,  PREG_SPLIT_NO_EMPTY  |  PREG_SPLIT_DELIM_CAPTURE );
-
+               $splitRegex = '/^\\s*(=[^=]+=)$/m';
+               $regex = '/^\\s*(=([^=]+)=)$/m';
+               $matches = preg_split($splitRegex, $documentation, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
                $currentSection = $docbookSection;
                foreach ($matches as $singleMatch) {
                        if (preg_match($regex, $singleMatch, $tmp)) {
@@ -175,18 +157,15 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
                $splitRegex = '/
                (<code(?:.*?)>
                        (?:.*?)
-               <\/code>)/xs';
-
+               <\\/code>)/xs';
                $regex = '/
                <code(.*?)>
                        (.*?)
-               <\/code>/xs';
-               $matches = preg_split($splitRegex, $text, -1,  PREG_SPLIT_NO_EMPTY  |  PREG_SPLIT_DELIM_CAPTURE );
+               <\\/code>/xs';
+               $matches = preg_split($splitRegex, $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
                foreach ($matches as $singleMatch) {
-
                        if (preg_match($regex, $singleMatch, $tmp)) {
                                preg_match('/title="([^"]+)"/', $tmp[1], $titleMatch);
-
                                $example = $parentElement->addChild('example');
                                if (count($titleMatch)) {
                                        $example->addChild('title', trim($titleMatch[1]));
@@ -195,13 +174,18 @@ class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerat
                                }
                                $this->addChildWithCData($example, 'programlisting', trim($tmp[2]));
                        } else {
-                               $textParts = explode("\n", $singleMatch);
+                               $textParts = explode('
+', $singleMatch);
                                foreach ($textParts as $text) {
-                                       if (trim($text) === '') continue;
+                                       if (trim($text) === '') {
+                                               continue;
+                                       }
                                        $this->addChildWithCData($parentElement, 'para', trim($text));
                                }
                        }
                }
        }
+
 }
+
 ?>
\ No newline at end of file
index 73a3c76..9e42d43 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,12 +8,10 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * Abstract Fluid Template View.
  *
  * Contains the fundamental methods which any Fluid based template view needs.
- *
  */
 abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View_ViewInterface {
 
@@ -24,7 +21,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
        const RENDERING_TEMPLATE = 1;
        const RENDERING_PARTIAL = 2;
        const RENDERING_LAYOUT = 3;
-
        /**
         * @var Tx_Extbase_MVC_Controller_ControllerContext
         */
@@ -57,6 +53,7 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
        /**
         * Stack containing the current rendering type, the current rendering context, and the current parsed template
         * Do not manipulate directly, instead use the methods"getCurrent*()", "startRendering(...)" and "stopRendering()"
+        *
         * @var array
         */
        protected $renderingStack = array();
@@ -123,9 +120,10 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
        }
 
        public function initializeView() {
+
        }
-       // Here, the backporter can insert the initializeView method, which is needed for Fluid v4.
 
+       // Here, the backporter can insert the initializeView method, which is needed for Fluid v4.
        /**
         * Assign a value to the variable container.
         *
@@ -173,7 +171,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
        public function render($actionName = NULL) {
                $this->baseRenderingContext->setControllerContext($this->controllerContext);
                $this->templateParser->setConfiguration($this->buildParserConfiguration());
-
                $templateIdentifier = $this->getTemplateIdentifier($actionName);
                if ($this->templateCompiler->has($templateIdentifier)) {
                        $parsedTemplate = $this->templateCompiler->get($templateIdentifier);
@@ -183,7 +180,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                                $this->templateCompiler->store($templateIdentifier, $parsedTemplate);
                        }
                }
-
                if ($parsedTemplate->hasLayout()) {
                        $layoutName = $parsedTemplate->getLayoutName($this->baseRenderingContext);
                        $layoutIdentifier = $this->getLayoutIdentifier($layoutName);
@@ -203,7 +199,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                        $output = $parsedTemplate->render($this->baseRenderingContext);
                        $this->stopRendering();
                }
-
                return $output;
        }
 
@@ -227,20 +222,18 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                        $renderingContext->injectTemplateVariableContainer($variableContainer);
                        $renderingTypeOnNextLevel = $this->getCurrentRenderingType();
                }
-
                $parsedTemplate = $this->getCurrentParsedTemplate();
-
                if ($parsedTemplate->isCompiled()) {
                        $methodNameOfSection = 'section_' . sha1($sectionName);
                        if ($ignoreUnknown && !method_exists($parsedTemplate, $methodNameOfSection)) {
                                return '';
                        }
                        $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
-                       $output = $parsedTemplate->$methodNameOfSection($renderingContext);
+                       $output = $parsedTemplate->{$methodNameOfSection}($renderingContext);
                        $this->stopRendering();
                } else {
                        $sections = $parsedTemplate->getVariableContainer()->get('sections');
-                       if(!array_key_exists($sectionName, $sections)) {
+                       if (!array_key_exists($sectionName, $sections)) {
                                $controllerObjectName = $this->controllerContext->getRequest()->getControllerObjectName();
                                if ($ignoreUnknown) {
                                        return '';
@@ -249,14 +242,11 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                                }
                        }
                        $section = $sections[$sectionName];
-
                        $renderingContext->getViewHelperVariableContainer()->add('Tx_Fluid_ViewHelpers_SectionViewHelper', 'isCurrentlyRenderingSection', 'TRUE');
-
                        $this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
                        $output = $section->evaluate($renderingContext);
                        $this->stopRendering();
                }
-
                return $output;
        }
 
@@ -274,7 +264,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                        $this->partialIdentifierCache[$partialName] = $this->getPartialIdentifier($partialName);
                }
                $partialIdentifier = $this->partialIdentifierCache[$partialName];
-
                if ($this->templateCompiler->has($partialIdentifier)) {
                        $parsedPartial = $this->templateCompiler->get($partialIdentifier);
                } else {
@@ -283,11 +272,9 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                                $this->templateCompiler->store($partialIdentifier, $parsedPartial);
                        }
                }
-
                $variableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $variables);
                $renderingContext = clone $this->getCurrentRenderingContext();
                $renderingContext->injectTemplateVariableContainer($variableContainer);
-
                $this->startRendering(self::RENDERING_PARTIAL, $parsedPartial, $renderingContext);
                if ($sectionName !== NULL) {
                        $output = $this->renderSection($sectionName, $variables);
@@ -295,7 +282,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                        $output = $parsedPartial->render($renderingContext);
                }
                $this->stopRendering();
-
                return $output;
        }
 
@@ -335,7 +321,7 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
         * this method returns that path, otherwise a path and filename will be
         * resolved using the layoutPathAndFilenamePattern.
         *
-        * @param string $layoutName Name of the layout to use. If none given, use "Default"
+        * @param string $layoutName Name of the layout to use. If none given, use "Default
         * @return string Path and filename of layout file
         * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
         */
@@ -368,7 +354,6 @@ abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Extbase_MVC_View
                $parserConfiguration = $this->objectManager->create('Tx_Fluid_Core_Parser_Configuration');
                if ($this->controllerContext->getRequest()->getFormat() === 'html') {
                        $parserConfiguration->addInterceptor($this->objectManager->get('Tx_Fluid_Core_Parser_Interceptor_Escape'));
-
                }
                return $parserConfiguration;
        }
index a207758..6b434e0 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * A generic Fluid View exception.
  *
  * @api
  */
 class Tx_Fluid_View_Exception extends Tx_Fluid_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 05dfd95..5b41aae 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *                                                                        *
  * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
-
 /**
  * An "Invalid Section" exception
  *
  * @api
  */
 class Tx_Fluid_View_Exception_InvalidSectionException extends Tx_Fluid_View_Exception {
+
+
 }
 
 ?>
\ No newline at end of file
index 3dbe808..5e9cc82 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*                                                                        *
  * This script is backported from the FLOW3 package "TYPO3.Fluid".        *
  *                                                                        *
@@ -9,13 +8,14 @@
  *