protected function _set_border($side, $border_spec, $important)
    {
        $border_spec = preg_replace("/\s*\,\s*/", ",", $border_spec);
        //$border_spec = str_replace(",", " ", $border_spec); // Why did we have this ?? rbg(10, 102, 10) > rgb(10  102  10)
        $arr = explode(" ", $border_spec);

        // FIXME: handle partial values

        //For consistency of individal and combined properties, and with ie8 and firefox3
        //reset all attributes, even if only partially given
        $this->_set_style_side_type('border', $side, '_style', self::$_defaults['border_' . $side . '_style'], $important);
        $this->_set_style_side_type('border', $side, '_width', self::$_defaults['border_' . $side . '_width'], $important);
        $this->_set_style_side_type('border', $side, '_color', self::$_defaults['border_' . $side . '_color'], $important);

        foreach ($arr as $value) {
            $value = trim($value);
            if (in_array($value, self::$BORDER_STYLES)) {
                $this->_set_style_side_type('border', $side, '_style', $value, $important);
            } else if (preg_match("/[.0-9]+(?:px|pt|pc|em|ex|%|in|mm|cm)|(?:thin|medium|thick)/", $value)) {
                $this->_set_style_side_type('border', $side, '_width', $value, $important);
            } else {
                // must be color
                $this->_set_style_side_type('border', $side, '_color', $value, $important);
            }
        }

        //see __set and __get, on all assignments clear cache!
        $this->_prop_cache['border_' . $side] = null;
        $this->_props['border_' . $side] = $border_spec;
    }
protected function _set_border($side, $border_spec, $important)
    {
        $border_spec = preg_replace("/\s*\,\s*/", ",", $border_spec);
        //$border_spec = str_replace(",", " ", $border_spec); // Why did we have this ?? rbg(10, 102, 10) > rgb(10  102  10)
        $arr = explode(" ", $border_spec);

        // FIXME: handle partial values

        //For consistency of individal and combined properties, and with ie8 and firefox3
        //reset all attributes, even if only partially given
        $this->_set_style_side_type('border', $side, '_style', self::$_defaults['border_' . $side . '_style'], $important);
        $this->_set_style_side_type('border', $side, '_width', self::$_defaults['border_' . $side . '_width'], $important);
        $this->_set_style_side_type('border', $side, '_color', self::$_defaults['border_' . $side . '_color'], $important);

        foreach ($arr as $value) {
            $value = trim($value);
            if (in_array($value, self::$BORDER_STYLES)) {
                $this->_set_style_side_type('border', $side, '_style', $value, $important);
            } else if (preg_match("/[.0-9]+(?:px|pt|pc|em|ex|%|in|mm|cm)|(?:thin|medium|thick)/", $value)) {
                $this->_set_style_side_type('border', $side, '_width', $value, $important);
            } else {
                // must be color
                $this->_set_style_side_type('border', $side, '_color', $value, $important);
            }
        }

        //see __set and __get, on all assignments clear cache!
        $this->_prop_cache['border_' . $side] = null;
        $this->_props['border_' . $side] = $border_spec;
    }
protected function _set_border ( $ side , $ border_spec , $ important ) { $ border_spec = preg_replace ( "/\s*\,\s*/" , "," , $ border_spec ) ; //$border_spec = str_replace(",", " ", $border_spec); // Why did we have this ?? rbg(10, 102, 10) > rgb(10  102  10) $ arr = explode ( " " , $ border_spec ) ; // FIXME: handle partial values //For consistency of individal and combined properties, and with ie8 and firefox3 //reset all attributes, even if only partially given $ this -> _set_style_side_type ( 'border' , $ side , '_style' , self :: $ _defaults [ 'border_' . $ side . '_style' ] , $ important ) ; $ this -> _set_style_side_type ( 'border' , $ side , '_width' , self :: $ _defaults [ 'border_' . $ side . '_width' ] , $ important ) ; $ this -> _set_style_side_type ( 'border' , $ side , '_color' , self :: $ _defaults [ 'border_' . $ side . '_color' ] , $ important ) ; foreach ( $ arr as $ value ) { $ value = trim ( $ value ) ; if ( in_array ( $ value , self :: $ BORDER_STYLES ) ) { $ this -> _set_style_side_type ( 'border' , $ side , '_style' , $ value , $ important ) ; } else if ( preg_match ( "/[.0-9]+(?:px|pt|pc|em|ex|%|in|mm|cm)|(?:thin|medium|thick)/" , $ value ) ) { $ this -> _set_style_side_type ( 'border' , $ side , '_width' , $ value , $ important ) ; } else { // must be color $ this -> _set_style_side_type ( 'border' , $ side , '_color' , $ value , $ important ) ; } } //see __set and __get, on all assignments clear cache! $ this -> _prop_cache [ 'border_' . $ side ] = null ; $ this -> _props [ 'border_' . $ side ] = $ border_spec ; }
Sets a single border

@param string $side
@param string $border_spec ([width] [style] [color])
@param boolean $important
Sets a single border