Lines Matching defs:class
131 class simple_html_dom_node
571 list($tag, $id, $class, $attributes, $cmb) = $selector;
640 // Check if all class(es) exist
641 if ($pass && $class !== '' && is_array($class) && !empty($class)) {
642 if (isset($node->attr['class'])) {
643 $node_classes = explode(' ', $node->attr['class']);
649 foreach($class as $c) {
860 * [3] - class names (including dots)
863 * followed by the class name (one or more words and hyphens)
1157 // Look in the tag to see if there is a class or id specified that has
1162 // class or id that has an img selector that specifies a height or width
1163 // Note that in this case, the class or id will have the img subselector
1167 // If the class or id is specified in a SEPARATE css file thats not on
1190 function addClass($class)
1192 if (is_string($class)) {
1193 $class = explode(' ', $class);
1196 if (is_array($class)) {
1197 foreach($class as $c) {
1198 if (isset($this->class)) {
1202 $this->class .= ' ' . $c;
1205 $this->class = $c;
1210 $debug_object->debug_log(2, 'Invalid type: ', gettype($class));
1215 function hasClass($class)
1217 if (is_string($class)) {
1218 if (isset($this->class)) {
1219 return in_array($class, explode(' ', $this->class), true);
1223 $debug_object->debug_log(2, 'Invalid type: ', gettype($class));
1230 function removeClass($class = null)
1232 if (!isset($this->class)) {
1236 if (is_null($class)) {
1237 $this->removeAttribute('class');
1241 if (is_string($class)) {
1242 $class = explode(' ', $class);
1245 if (is_array($class)) {
1246 $class = array_diff(explode(' ', $this->class), $class);
1247 if (empty($class)) {
1248 $this->removeAttribute('class');
1250 $this->class = implode(' ', $class);
1386 class simple_html_dom
2119 // PaperG: If this is a "class" selector, lets get rid of the preceeding
2120 // and trailing space since some people leave it in the multi class case.
2121 if ($name === 'class') {