CSSSubProperty($owner); $this->_defaultValue = new BorderColor(new Color(array(0,0,0), true), new Color(array(0,0,0), true), new Color(array(0,0,0), true), new Color(array(0,0,0), true)); } function set_value(&$owner_value, &$value) { if ($value != CSS_PROPERTY_INHERIT) { $owner_value->top->setColor($value->top); $owner_value->right->setColor($value->right); $owner_value->bottom->setColor($value->bottom); $owner_value->left->setColor($value->left); } else { $owner_value->top->setColor(CSS_PROPERTY_INHERIT); $owner_value->right->setColor(CSS_PROPERTY_INHERIT); $owner_value->bottom->setColor(CSS_PROPERTY_INHERIT); $owner_value->left->setColor(CSS_PROPERTY_INHERIT); }; } function get_value(&$owner_value) { return new BorderColor($owner_value->top->color, $owner_value->right->color, $owner_value->bottom->color, $owner_value->left->color); } function get_property_code() { return CSS_BORDER_COLOR; } function get_property_name() { return 'border-color'; } function default_value() { return $this->_defaultValue; } function parse_in($value) { $values = preg_split("/(?default_value(); }; } function parse($value) { if ($value == 'inherit') { return CSS_PROPERTY_INHERIT; } $colors = $this->parse_in($value); return new BorderColor($colors[0], $colors[1], $colors[2], $colors[3]); } } ?>