Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

PropertyNameMatcher.php

Namespace

DeepCopy\Matcher

File

vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php

View source
<?php

namespace DeepCopy\Matcher;


/**
 * @final
 */
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;
    }

}

Classes

Title Deprecated Summary
PropertyNameMatcher @final

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal