public function getWeight(\DOMElement $e)
    {
        if (!$this->flagIsActive(self::FLAG_WEIGHT_ATTRIBUTES)) {
            return 0;
        }

        $weight = 0;
        // Look for a special classname
        $weight += $this->weightAttribute($e, 'class');
        // Look for a special ID
        $weight += $this->weightAttribute($e, 'id');

        return $weight;
    }
public function getWeight(\DOMElement $e)
    {
        if (!$this->flagIsActive(self::FLAG_WEIGHT_ATTRIBUTES)) {
            return 0;
        }

        $weight = 0;
        // Look for a special classname
        $weight += $this->weightAttribute($e, 'class');
        // Look for a special ID
        $weight += $this->weightAttribute($e, 'id');

        return $weight;
    }
public function getWeight ( \ DOMElement $ e ) { if ( ! $ this -> flagIsActive ( self :: FLAG_WEIGHT_ATTRIBUTES ) ) { return 0 ; } $ weight = 0 ; // Look for a special classname $ weight += $ this -> weightAttribute ( $ e , 'class' ) ; // Look for a special ID $ weight += $ this -> weightAttribute ( $ e , 'id' ) ; return $ weight ; }
Get an element relative weight.

@param \DOMElement $e

@return int
Get an element relative weight .