public function offsetSet($offset,$value) {
if ($value instanceof ColorModel){
if ($offset == "") { $this->container[] = $value;
}else { $this->container[$offset] = $value;
}
} else {
throw new Exception("Value have to be a instance of the Model ColorModel");
}
}
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}