-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPropertyInfoExtractor.php
More file actions
95 lines (82 loc) · 2.72 KB
/
Copy pathPropertyInfoExtractor.php
File metadata and controls
95 lines (82 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
namespace FDevs\PropertyInfo;
use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
class PropertyInfoExtractor implements PropertyInfoExtractorInterface
{
/**
* @var PropertyListExtractorInterface
*/
private $propertyList;
/**
* @var PropertyTypeExtractorInterface
*/
private $type;
/**
* @var PropertyAccessExtractorInterface;
*/
private $propertyAccess;
/**
* @var PropertyDescriptionExtractorInterface;
*/
private $propertyDescription;
/**
* PropertyInfoExtractor constructor.
* @param PropertyListExtractorInterface $propertyList
* @param PropertyTypeExtractorInterface $type
* @param PropertyAccessExtractorInterface $propertyAccess
* @param PropertyDescriptionExtractorInterface $propertyDescription
*/
public function __construct(PropertyListExtractorInterface $propertyList, PropertyTypeExtractorInterface $type, PropertyAccessExtractorInterface $propertyAccess, PropertyDescriptionExtractorInterface $propertyDescription)
{
$this->propertyList = $propertyList;
$this->type = $type;
$this->propertyAccess = $propertyAccess;
$this->propertyDescription = $propertyDescription;
}
/**
* {@inheritdoc}
*/
public function isReadable($class, $property, array $context = array())
{
return $this->propertyAccess->isReadable($class, $property, $context);
}
/**
* {@inheritdoc}
*/
public function isWritable($class, $property, array $context = array())
{
return $this->propertyAccess->isWritable($class, $property, $context);
}
/**
* {@inheritdoc}
*/
public function getShortDescription($class, $property, array $context = array())
{
return $this->propertyDescription->getShortDescription($class, $property, $context);
}
/**
* {@inheritdoc}
*/
public function getLongDescription($class, $property, array $context = array())
{
return $this->propertyDescription->getLongDescription($class, $property, $context);
}
/**
* {@inheritdoc}
*/
public function getProperties($class, array $context = array())
{
return $this->propertyList->getProperties($class, $context);
}
/**
* {@inheritdoc}
*/
public function getTypes($class, $property, array $context = array())
{
return $this->type->getTypes($class, $property, $context);
}
}