public function testContains()
 {
     $collection = new CAttributeCollection();
     $this->assertFalse($collection->contains('Property'));
     $collection->Property = 'value';
     $this->assertTrue($collection->contains('Property'));
 }
예제 #2
0
 public function testContains()
 {
     $collection = new CAttributeCollection();
     $this->assertEquals(false, $collection->contains('Property'));
     $collection->Property = 'value';
     $this->assertEquals(true, $collection->contains('Property'));
 }
예제 #3
0
 public function contains($key)
 {
     if (!parent::contains($key)) {
         return $this->loadParam($key);
     }
     return true;
 }
예제 #4
0
 /**
  * Returns whether there is an element at the specified offset.
  * This method is required by the interface ArrayAccess.
  * @param mixed $offset the offset to check on
  * @return boolean
  */
 public function offsetExists($offset)
 {
     return $this->_attributes->contains($offset);
 }