eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchContentInfo PHP Method

matchContentInfo() public method

Checks if a ContentInfo object matches.
public matchContentInfo ( eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo ) : boolean
$contentInfo eZ\Publish\API\Repository\Values\Content\ContentInfo
return boolean
    public function matchContentInfo(ContentInfo $contentInfo)
    {
        return isset($this->values[$contentInfo->id]);
    }

Usage Example

 /**
  * @dataProvider matchContentInfoProvider
  * @covers eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchContentInfo
  * @covers eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig
  *
  * @param int|int[] $matchingConfig
  * @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo
  * @param bool $expectedResult
  */
 public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult)
 {
     $this->matcher->setMatchingConfig($matchingConfig);
     $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo));
 }