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 |
HydratorPluginManager.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\AbstractPluginManager;
13 use Zend\Stdlib\Exception;
14
15 /**
16 * Plugin manager implementation for hydrators.
17 *
18 * Enforces that adapters retrieved are instances of HydratorInterface
19 */
20 class HydratorPluginManager extends AbstractPluginManager
21 {
22 /**
23 * Whether or not to share by default
24 *
25 * @var bool
26 */
27 protected $shareByDefault = false;
28
29 /**
30 * Default aliases
31 *
32 * @var array
33 */
34 protected $aliases = array(
35 'delegatinghydrator' => 'Zend\Stdlib\Hydrator\DelegatingHydrator',
36 );
37
38 /**
39 * Default set of adapters
40 *
41 * @var array
42 */
43 protected $invokableClasses = array(
44 'arrayserializable' => 'Zend\Stdlib\Hydrator\ArraySerializable',
45 'classmethods' => 'Zend\Stdlib\Hydrator\ClassMethods',
46 'objectproperty' => 'Zend\Stdlib\Hydrator\ObjectProperty',
47 'reflection' => 'Zend\Stdlib\Hydrator\Reflection'
48 );
49
50 /**
51 * Default factory-based adapters
52 *
53 * @var array
54 */
55 protected $factories = array(
56 'Zend\Stdlib\Hydrator\DelegatingHydrator' => 'Zend\Stdlib\Hydrator\DelegatingHydratorFactory',
57 );
58
59 /**
60 * {@inheritDoc}
61 */
62 public function validatePlugin($plugin)
63 {
64 if ($plugin instanceof HydratorInterface) {
65 // we're okay
66 return;
67 }
68
69 throw new Exception\RuntimeException(sprintf(
70 'Plugin of type %s is invalid; must implement Zend\Stdlib\Hydrator\HydratorInterface',
71 (is_object($plugin) ? get_class($plugin) : gettype($plugin))
72 ));
73 }
74 }
75