[CLEANUP] Remove $language from Extbase custom statement 58/27258/5
authorFelix Oertel <felix@oer.tel>
Sun, 2 Feb 2014 10:35:08 +0000 (11:35 +0100)
committerFelix Oertel <mehl@foertel.com>
Sun, 2 Feb 2014 13:15:39 +0000 (14:15 +0100)
The parameter $language in extbase's custom statement is not
used anywhere and does not make any sense in use with dbal.

Releases: 6.2
Resolves: #55580
Change-Id: I9c7edda24918b328da66872ef782a6d0e83b0fff
Reviewed-on: https://review.typo3.org/27258
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Stefano Kowalke
Tested-by: Stefano Kowalke
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Felix Oertel
Tested-by: Felix Oertel
typo3/sysext/extbase/Classes/Persistence/Generic/Qom/QueryObjectModelFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/Qom/Statement.php

index bddfe35..8ba3a9f 100644 (file)
@@ -58,11 +58,10 @@ class QueryObjectModelFactory implements \TYPO3\CMS\Core\SingletonInterface {
         *
         * @param string $statement The statement
         * @param array $boundVariables An array of variables to bind to the statement
-        * @param object|string $language The language of the statement. Must be a supported languanguage defined as \TYPO3\CMS\Extbase\Persistence\Generic\Qom\QueryObjectModelFactory::TYPO3_*
         * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement
         */
-       public function statement($statement, array $boundVariables = array(), $language = \TYPO3\CMS\Extbase\Persistence\Generic\Qom\Statement::TYPO3_SQL_MYSQL) {
-               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Statement', $statement, $boundVariables, $language);
+       public function statement($statement, array $boundVariables = array()) {
+               return $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Qom\\Statement', $statement, $boundVariables);
        }
 
        /**
index a1fa736..5f45db9 100644 (file)
@@ -33,11 +33,6 @@ namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom;
 class Statement {
 
        /**
-        * constants determining the language of the query
-        */
-       const TYPO3_SQL_MYSQL = 'TYPO3-SQL-MYSQL';
-
-       /**
         * @var string
         */
        protected $statement;
@@ -48,21 +43,14 @@ class Statement {
        protected $boundVariables = array();
 
        /**
-        * @var string
-        */
-       protected $language;
-
-       /**
         * Constructs the Statement instance
         *
         * @param string $statement The statement
         * @param array $boundVariables An array of variables to bind to the statement
-        * @param string $language The query language. One of the above constants.
         */
-       public function __construct($statement, array $boundVariables = array(), $language = self::TYPO3_SQL_MYSQL) {
+       public function __construct($statement, array $boundVariables = array()) {
                $this->statement = $statement;
                $this->boundVariables = $boundVariables;
-               $this->language = $language;
        }
 
        /**
@@ -82,13 +70,4 @@ class Statement {
        public function getBoundVariables() {
                return $this->boundVariables;
        }
-
-       /**
-        * Gets the language.
-        *
-        * @return string The language; one of self::
-        */
-       public function getLanguage() {
-               return $this->language;
-       }
 }