Add one or more classes to analyze

@param array|string $classes
503055
public function addClass($classes)
    {
        $classes = (array)$classes;
        foreach ($classes as $class) {
            if (class_exists($class) || interface_exists($class)) {
                $this->classes[] = $class;
            } else {
                echo "Class not exists: $class\r\n";
            }
        }
    }
799150
protected function _classesExtends($names, array $classes, array &$logs = array())
    {
        if (!is_array($names)) {
            $names = array($names);
        }
        foreach ($names as $_name) {
            foreach ($classes as $_class) {
                if (class_exists($_class)) {
                    if (CodeHelper::extendsClass($_name, $_class)) {
                        return true;
                    }
                } else {
                    $logs[] = $this->_getErrorMessage('Class "%s" not found!', $_class);
                }
            }
        }
        return false;
    }
508432
public function addClassFilter($classes)
    {
        if (is_array($classes) && count($classes) !== 0) {
            $filters = array();
            foreach ($classes as $class) {
                class_exists($class);
                $filters[] = 'cc INSTANCE OF \''.  $class .'\'';
            }

            $filter = implode(' OR ', $filters);

            $this->andWhere($filter);
        }
    }
1251918
public function toggleClasses( array $classes, $toggle = null ) {
		if ( $toggle === null ) {
			$this->classes = array_diff(
				array_merge( $this->classes, $classes ),
				array_intersect( $this->classes, $classes )
			);
		} elseif ( $toggle ) {
			$this->classes = array_merge( $this->classes, $classes );
		} else {
			$this->classes = array_diff( $this->classes, $classes );
		}
		return $this;
	}
1026837
public function attachPearPrefixes(array $classes)
    {
        foreach ($classes as $prefix => $paths) {
            $this->attachPearPrefix($prefix, $paths);
        }
        return $this;
    }
854150
public static function classes($classes = [])
    {
        if (!isset(static::$_dependencies[static::class])) {
            static::$_dependencies[static::class] = static::$_classes;
        }
        if (func_num_args()) {
            static::$_dependencies[static::class] = Set::extend(static::$_dependencies[static::class], $classes);
        }
        return static::$_dependencies[static::class];
    }
1156300
public function registerPrefixes(array $classes)
    {
        foreach ($classes as $prefix => $locations) {
            $this->prefixes[$prefix] = (array) $locations;
        }
    }
1210504
public function updateClassNames(&$classes)
    {
        // Update Class Names (via parent):
        
        parent::updateClassNames($classes);
        
        // Update Class Names:
        
        if ($this->owner->isEdgeToEdge()) {
            $classes[] = $this->style('column.edge-to-edge');
        }
    }
587805
public function AddErrorClass(&$Attributes) {
      if (isset($Attributes['class']))
         $Attributes['class'] .= ' '.$this->ErrorClass;
      else
         $Attributes['class'] = $this->ErrorClass;
   }
794369
protected function validateClasses($classes)
    {
        if (!is_array($classes)) {
            $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function'];

            throw new InvalidArgumentException("Breadcrumbs::{$trace}() only accepts strings or arrays.");
        }

        foreach ($classes as $key => $class) {
            if (!is_string($class)) {
                $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function'];

                throw new InvalidArgumentException(
                    "Breadcrumbs::{$trace}() was passed an array, but at least one of the values " .
                    "was not a string: \$classes['{$key}'] = " . print_r($class, true)
                );
            }
        }
    }
947798
public function addClasses(string ...$classes): self
    {
        $this->classes = array_unique(array_merge($this->classes, $classes));

        return $this;
    }
1221864
public function addClassPropertyLocations(array $references)
    {
        foreach ($references as $referenced_member_id => $locations) {
            if (isset(self::$class_property_locations[$referenced_member_id])) {
                self::$class_property_locations[$referenced_member_id] = array_merge(
                    self::$class_property_locations[$referenced_member_id],
                    $locations
                );
            } else {
                self::$class_property_locations[$referenced_member_id] = $locations;
            }
        }
    }
120828
private function loadClassTraits(array $classes)
    {
        $hierarchy = [];

        foreach ($classes as $class) {
            $traits = $this->loadTraits($class->getTraits());

            // Reverse the order of the traits list, (deepest becomes first as later traits overwrite).
            // And add them before the class (class overwrites traits).
            $hierarchy = array_merge($hierarchy, array_reverse($traits));
            $hierarchy[] = $class->name;
        }

        return $hierarchy;
    }
330541
public static function addBodyClass(array $classes)
    {
        if (is_single() || is_page() && !is_front_page()) {
            if (!in_array(basename(get_permalink()), $classes)) {
                $classes[] = basename(get_permalink());
            }
        }

        return $classes;
    }
753160
public static function registerHelpers( $classes ) {

		if( !is_array($classes) )
			$classes = [$classes];

		foreach( $classes as $class ) {

			$class   = new \ReflectionClass($class);
			$methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_STATIC);

			foreach( $methods as $m ) {
				static::addHelperMethod($class->name, $m->name);
			}
			
		}

	}
1138309
public function defineModelClasses($modelClasses = [])
    {
        $this->modelMap = ArrayHelper::merge(
            $this->getDefaultModels(),
            $this->modelMap,
            $modelClasses
        );
    }
367333
public function updateContentClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        foreach ($this->getTextAlignmentClassNames() as $class) {
            $classes[] = $class;
        }
        
        foreach ($this->getImageAlignmentClassNames() as $class) {
            $classes[] = $class;
        }
    }