Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
DelegatingHydrator.php
01 <?php
02 /**
03 * Zend Framework (http://framework.zend.com/)
04 *
05 * @link http://github.com/zendframework/zf2 for the canonical source repository
06 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
07 * @license http://framework.zend.com/license/new-bsd New BSD License
08 */
09
10 namespace Zend\Stdlib\Hydrator;
11
12 use Zend\ServiceManager\ServiceLocatorInterface;
13
14 class DelegatingHydrator implements HydratorInterface
15 {
16 /**
17 * @var ServiceLocatorInterface
18 */
19 protected $hydrators;
20
21 /**
22 * Constructor
23 *
24 * @param ServiceLocatorInterface $hydrators
25 */
26 public function __construct(ServiceLocatorInterface $hydrators)
27 {
28 $this->hydrators = $hydrators;
29 }
30
31 /**
32 * {@inheritdoc}
33 */
34 public function hydrate(array $data, $object)
35 {
36 return $this->getHydrator($object)->hydrate($data, $object);
37 }
38
39 /**
40 * {@inheritdoc}
41 */
42 public function extract($object)
43 {
44 return $this->getHydrator($object)->extract($object);
45 }
46
47 /**
48 * Gets hydrator of an object
49 *
50 * @param object $object
51 * @return HydratorInterface
52 */
53 protected function getHydrator($object)
54 {
55 return $this->hydrators->get(get_class($object));
56 }
57 }
58