ValueObjects\Structure\Dictionary::containsValue PHP Method

containsValue() public method

Tells whether $object is one of the values
public containsValue ( ValueObjects\ValueObjectInterface $object ) : boolean
$object ValueObjects\ValueObjectInterface
return boolean
    public function containsValue(ValueObjectInterface $object)
    {
        $values = $this->values();
        return $values->contains($object);
    }

Usage Example

コード例 #1
0
 public function testContainsValue()
 {
     $one = new StringLiteral('one');
     $ten = new StringLiteral('ten');
     $this->assertTrue($this->dictionary->containsValue($one));
     $this->assertFalse($this->dictionary->containsValue($ten));
 }