public function getElementsByClassName($class)
    {
        if (strpos($class, '"') !== false
            || strpos($class, "'") !== false
        ) {
            return array();
        }

        $xpath = './/*[contains(concat(" ", @class, " "), " ' . htmlspecialchars($class) . ' ")]';
        return $this->xpath($xpath);
    }
public function getElementsByClassName($class)
    {
        if (strpos($class, '"') !== false
            || strpos($class, "'") !== false
        ) {
            return array();
        }

        $xpath = './/*[contains(concat(" ", @class, " "), " ' . htmlspecialchars($class) . ' ")]';
        return $this->xpath($xpath);
    }
Return all elements with the given class name

Should work like DOM0's method

@param    string $class Class name
@return    array                Array of SimpleDOM nodes