Horde_Kolab_Server_Object_Attribute_Value::value PHP Méthode

value() public méthode

Return the value of this attribute.
public value ( ) : array
Résultat array The value(s) of this attribute.
    public function value()
    {
        $internal = $this->attribute->value();
        if (isset($internal[$this->name])) {
            return $internal[$this->name];
        } else {
            throw new Horde_Kolab_Server_Exception(sprintf('Missing value %s!', $this->name));
        }
    }

Usage Example

Exemple #1
0
 public function testMethodValueHasResultArrayTheValuesOfTheAttribute()
 {
     $attribute = new Horde_Kolab_Server_Object_Attribute_Value($this->object, $this->composite, 'name');
     $this->object->expects($this->once())->method('getInternal')->with('name')->will($this->returnValue(array(1, 2)));
     $this->assertEquals(array(1, 2), $attribute->value());
 }
Horde_Kolab_Server_Object_Attribute_Value