class PropertyNameMatcher
@final
Hierarchy
- class \DeepCopy\Matcher\PropertyNameMatcher implements \DeepCopy\Matcher\Matcher
Expanded class hierarchy of PropertyNameMatcher
File
-
vendor/
myclabs/ deep-copy/ src/ DeepCopy/ Matcher/ PropertyNameMatcher.php, line 8
Namespace
DeepCopy\MatcherView source
class PropertyNameMatcher implements Matcher {
/**
* @var string
*/
private $property;
/**
* @param string $property Property name
*/
public function __construct($property) {
$this->property = $property;
}
/**
* Matches a property by its name.
*
* {@inheritdoc}
*/
public function matches($object, $property) {
return $property == $this->property;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
PropertyNameMatcher::$property | private | property | ||
PropertyNameMatcher::matches | public | function | Matches a property by its name. | Overrides Matcher::matches |
PropertyNameMatcher::__construct | public | function |