Mercurial > hg > cmmr2012-drupal-site
comparison vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php @ 2:5311817fb629
Theme updates
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 13:19:18 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:0b0e5f3b1e83 | 2:5311817fb629 |
---|---|
1 <?php | |
2 | |
3 namespace DeepCopy\Matcher; | |
4 | |
5 /** | |
6 * @final | |
7 */ | |
8 class PropertyNameMatcher implements Matcher | |
9 { | |
10 /** | |
11 * @var string | |
12 */ | |
13 private $property; | |
14 | |
15 /** | |
16 * @param string $property Property name | |
17 */ | |
18 public function __construct($property) | |
19 { | |
20 $this->property = $property; | |
21 } | |
22 | |
23 /** | |
24 * Matches a property by its name. | |
25 * | |
26 * {@inheritdoc} | |
27 */ | |
28 public function matches($object, $property) | |
29 { | |
30 return $property == $this->property; | |
31 } | |
32 } |