Add class names to the "class" attribute of HTML table.

@param string|array $class
@return $this
963752
public function addTableClass($class)
    {
        $class = is_array($class) ? implode(' ', $class) : $class;
        $currentClass = Arr::get(array_change_key_case($this->tableAttributes), 'class');

        $classes = preg_split('#\s+#', $currentClass . ' ' . $class, null, PREG_SPLIT_NO_EMPTY);
        $class = implode(' ', array_unique($classes));

        return $this->setTableAttribute('class', $class);
    }
708711
public function map($name, $class = null)
    {
        if (is_array($name)) {
            foreach ($name as $name => $class) {
                $this->map($name, $class);
            }

            return $this;
        }

        $this->builder->addDiscriminatorMapClass($name, $class);

        return $this;
    }
1194579
public function remove_class( $class ) {
		if ( !isset( $this->attr['class'] ) || !is_array( $this->attr['class'] ) ) {
			$this->_sanitize_class();
		}
		$this->attr['class'] = array_diff( $this->attr['class'], array( $class ) );
		return $this;
	}
1014017
public function addClasses( array $classes ) {
		$this->classes = array_unique( array_merge( $this->classes, $classes ) );
		return $this;
	}
365281
public function removeClass($class)
    {
        $classes = $this->get('class');
        if ($classes) {
            $classes = trim(preg_replace('/(^| ){1}' . $class . '( |$){1}/i', ' ', $classes));
            $this->set('class', $classes);
        }

        return $this;
    }
949404
public function addClass($className)
    {
        list($oldClassArray, $newClassArray) = $this->getClassArrays($className);

        $this->attributes['class'] = implode(array_unique(array_merge($oldClassArray, $newClassArray)), ' ');

        return $this;
    }
569197
public function addClass($class) {
		$class = trim($class);
		
		if (strpos($class, ' ') !== false) {
			$this->addClasses(explode(' ', $class));
			return $this;
		}
		
		$this->_classes[$class] = $class;
		$this->_tagCached       = null;
		
		return $this;
	}
1133756
public function setAttributes($attributes)
    {
        foreach ($attributes as $attribute => $value) {
            if ($attribute === 'class') {
                $this->addClass($value);
                continue;
            }

            if (is_int($attribute)) {
                $attribute = $value;
                $value = '';
            }

            $this->setAttribute($attribute, (string) $value);
        }

        return $this;
    }
947798
public function addClasses(string ...$classes): self
    {
        $this->classes = array_unique(array_merge($this->classes, $classes));

        return $this;
    }
660541
protected function addClass($addClass) {
        $targetClass = $this->getAttrib('class');
        if(!empty($targetClass) && (strpos($targetClass, $addClass) === false)) {
            $targetClass .= " {$addClass}";
        } else {
            $targetClass = $addClass;
        }
        $this->setAttrib('class', $targetClass);
        return $this;
    }
984753
public function addElementsClass($class) {
		foreach ($this->getElements() as $element) {
			if ($element instanceof Tag) {
				$element->addClass($class);
			}
		}
		
		return $this;
	}
610255
public function addClass($class_name)
    {
        $add_names = \is_array($class_name) ? $class_name : explode(' ', $class_name);

        foreach ($this->getElements() as $node) {
            $node_classes = array();
            if ($node_class_attr = $node->getAttribute('class')) {
                $node_classes = explode(' ', $node_class_attr);
            }
            foreach ($add_names as $add_name) {
                if (!\in_array($add_name, $node_classes, true)) {
                    $node_classes[] = $add_name;
                }
            }
            if (\count($node_classes) > 0) {
                $node->setAttribute('class', implode(' ', $node_classes));
            }
        }

        return $this;
    }
464107
public function addClass($class)
    {
        if (!is_array($class)) {
            $class = preg_split('/\s+/', $class, null, PREG_SPLIT_NO_EMPTY);
        }
        $curClass = preg_split('/\s+/', $this->getAttribute('class'),
                               null, PREG_SPLIT_NO_EMPTY);
        foreach ($class as $c) {
            if (!in_array($c, $curClass)) {
                $curClass[] = $c;
            }
        }
        $this->setAttribute('class', implode(' ', $curClass));

        return $this;
    }
882071
public function setNavigationClass($class) {
        if(is_string($class) && !empty(trim($class))){
            $this->menuElements['ul_class'] = $class;
        }
        if((is_string($class) && empty(trim($class))) || $class === false){
            $this->menuElements['ul_class'] = '';
        }
        return $this;
    }
102045
public function load(string $class): self
    {
        $filename = $this->getFilename($class);
        if ($filename !== null) {
            (static function($__filename) {
                include_once $__filename;
            })($filename);
        }
        return $this;
    }
550253
public static function load($class)
    {
        $instance = new $class;
        $taxonomy_key = $instance->getTaxonomyKey();

        if (is_admin()) {
            add_action(sprintf('created_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('edited_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('%s_add_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));
            add_action(sprintf('%s_edit_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));

            add_action(sprintf('manage_edit-%s_columns', $taxonomy_key), array($instance, 'addAdminColumns'), 10, 3);
            add_action(sprintf('manage_%s_custom_column', $taxonomy_key), array($instance, 'renderAdminColumn'), 10, 3);

            // TODO add sorting
            //add_filter(sprintf('manage_edit-%s_sortable_columns', $taxonomy_key), array($instance, 'makeAdminColumnsSortable'));
            //add_filter('request', array($instance, 'sortAdminColumns'));
        }
    }
747944
public function addClass($className) {
        $oldClassName    = $this->getAttributeValue('class');
        $oldClassNameArr = $oldClassName ? explode(' ', $oldClassName) : array();
        $classNameArr    = array_merge($oldClassNameArr, explode(' ', $className));
        // housekeeping
        $classNameArr    = array_unique(array_filter(array_map('trim', $classNameArr)));
        $this->setAttribute('class', implode(' ', $classNameArr));
    }