src/ADT/CSS/Sheet.php
public function addRule( ADT_CSS_Rule $rule ){
		$got = $this->getRuleBySelector( $rule->selector );
		if( $got )
			foreach( $rule->getProperties() as $property )
				$got->setPropertyByKey( $property->getKey(), $property->getValue() );
		else{
			if( !preg_match( '/([a-z])|(#|\.[a-z])/i', $rule->getSelector() ) )
				throw new InvalidArgumentException( 'Invalid selector' );
			$this->rules[]	= $rule;
		}
	}
public function addRule( ADT_CSS_Rule $rule ){
		$got = $this->getRuleBySelector( $rule->selector );
		if( $got )
			foreach( $rule->getProperties() as $property )
				$got->setPropertyByKey( $property->getKey(), $property->getValue() );
		else{
			if( !preg_match( '/([a-z])|(#|\.[a-z])/i', $rule->getSelector() ) )
				throw new InvalidArgumentException( 'Invalid selector' );
			$this->rules[]	= $rule;
		}
	}
public function addRule ( ADT_CSS_Rule $ rule ) { $ got = $ this -> getRuleBySelector ( $ rule -> selector ) ; if ( $ got ) foreach ( $ rule -> getProperties ( ) as $ property ) $ got -> setPropertyByKey ( $ property -> getKey ( ) , $ property -> getValue ( ) ) ; else { if ( ! preg_match ( '/([a-z])|(#|\.[a-z])/i' , $ rule -> getSelector ( ) ) ) throw new InvalidArgumentException ( 'Invalid selector' ) ; $ this -> rules [ ] = $ rule ; } }
Add rule object
@access		public
@param		ADT_CSS_Rule	$rule		CSS rule object
@return		void
Add rule object