[TASK] Prepare AbstractRepository of FAL for FLOW sync
authorAlexander Schnitzler <alex.schnitzler@typovision.de>
Mon, 19 Nov 2012 11:42:57 +0000 (12:42 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Wed, 28 Nov 2012 19:13:30 +0000 (20:13 +0100)
The extbase team wants to be in sync with TYPO3 Flow
again which leads to the change of the Repository
Interface that defines three new methods one has to
implement to fulfill the interface contract. As the
AbstractRepsoitory of FAL directly uses the interface
instead of the Repository class it has to implement
these methods itself.

Releases: 6.1
Fixes: #43092
Change-Id: I14a1c8f3111c55f4a7b77d6c82669073b5a4a150
Reviewed-on: http://review.typo3.org/16564
Reviewed-by: Mattias Nilsson
Reviewed-by: Stefan Neufeind
Reviewed-by: Oliver Klee
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/AbstractRepository.php

index 676e48e..a488c5c 100644 (file)
@@ -230,6 +230,38 @@ abstract class AbstractRepository implements \TYPO3\CMS\Extbase\Persistence\Repo
                throw new \BadMethodCallException('Repository does not support the createQuery() method.', 1313185908);
        }
 
+       /**
+        * Finds an object matching the given identifier.
+        *
+        * @param mixed $identifier The identifier of the object to find
+        * @return object The matching object if found, otherwise NULL
+        * @api
+        */
+       public function findByIdentifier($identifier) {
+               return $this->findByUid($identifier);
+       }
+
+       /**
+        * Magic call method for repository methods.
+        *
+        * @param string $method Name of the method
+        * @param array $arguments The arguments
+        * @return void
+        */
+       public function __call($method, $arguments) {
+               // deliberately empty
+       }
+
+       /**
+        * Returns the object type this repository is managing.
+        *
+        * @return string
+        * @api
+        */
+       public function getEntityClassName() {
+               return $this->objectType;
+       }
+
 }