Filter by rhe classname descriminator.

@param  array $classes
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);
        }
    }
193082
def class_filter(classes, class_name):
    
    result_classes = classes
    if isinstance(class_name, list):
        if set(class_name) <= set(classes):
            result_classes = class_name
    return result_classes
522375
public function setClasses( $classes )
	{
		$this->attributes['class']	= array();
		if( is_string( $classes ) )
			$classes	= explode( " ", $classes );
		if( !is_array( $classes ) && !( $classes instanceof ArrayIterator ) )
			throw new InvalidArgumentException( 'Class attribute must be string, array or iterator' );
		foreach( $classes as $class )
			$this->addClass( $class );
	}
12987
protected function supportClasses($subject, array $classes) {
        foreach ($classes as $supportedClass) {
            if ($subject instanceof $supportedClass) {
                return true;
            }
        }

        return false;
    }
417955
public function setClassNames(array $classNames): void
    {
        $this->classNames = count($classNames) > 0 ? array_combine($classNames, array_fill(0, count($classNames), true)) : [];
    }
630159
public function updateClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        if ($class = $this->owner->PaginationSizeClass) {
            $classes[] = $class;
        }
        
        if ($class = $this->owner->PaginationButtonModeClass) {
            $classes[] = $class;
        }
    }
646051
private function filterScanners($scanners)
    {
        $scannerInstances = [];
        $scanners = is_array($scanners) ? $scanners : [$scanners];
        foreach ($scanners as $key => $scanner) {
            if (!is_a($scanner, ScannerInterface::class, true)) {
                throw new \InvalidArgumentException(
                    "The passed scanner with key `$key` doesn't seem to be either a valid ".ScannerInterface::class.
                    ' instance or extended class'
                );
            }

            $scannerInstances[] = $scanner instanceof ScannerInterface
                ? $scanner
                : new $scanner();
        }

        return $scannerInstances;
    }
977657
public function setClassifiers(array $classifiers)
    {
        $this->classifiers = $classifiers;
        return $this->classifiers === $classifiers ? true : false;
    }
29655
protected function parseCssClasses($classes)
    {
        if (is_string($classes)) {
            $classes = explode(' ', $classes);
        }

        if (!is_array($classes)) {
            throw new InvalidArgumentException('CSS Class(es) must be a space-delimited string or an array');
        }

        return array_filter($classes, 'strlen');
    }
1348260
protected function calculateClassVar($data, $classes)
    {
        // s is an n (number of classes) by m (number of column) matrix
        $s = array_fill(0, count($data[0]), array_fill(0, count($data[0]), 0));
        $sW = new Matrix($s, false);

        foreach ($data as $index => $row) {
            $label = array_search($classes[$index], $this->labels);
            $means = $this->means[$label];

            $row = $this->calculateVar($row, $means);

            $sW = $sW->add($row);
        }

        return $sW;
    }
346633
public function registerClasses(array $classDefinitions)
    {
        foreach ($classDefinitions as $className => $formatDefinitions) {
            $this->registerClass($className, $formatDefinitions);
        }
    }
11120
public function getSubAdminClasses(array $classes)
    {
        $classCollection = [];

        foreach ($classes as $key => $class) {
            if ($this->usableClass($key)) {
                $classCollection[] = [$key => $this->getSubAdminClasses($class)];
                continue;
            }

            if ($this->usableClass($class)) {
                $classCollection[] = $class;
                continue;
            }
        }

        return $classCollection;
    }
1334456
protected function discoverAnnotations(array $classes) : array {
    AnnotationRegistry::reset();
    AnnotationRegistry::registerLoader('class_exists');

    $reader = $this->createReader();

    $annotations = [];
    foreach ($classes as $class) {
      $reflection = new \ReflectionClass($class);
      if (!$reflection->isSubclassOf($this->serviceInterface)) {
        continue;
      }

      /** @var \dpi\ak\Annotation\AvatarService $annotation */
      $annotation = $reader->getClassAnnotation($reflection, $this->annotationClass);
      if ($annotation) {
        $annotations[$class] = $annotation;
      }
    }

    AnnotationRegistry::reset();

    return $annotations;
  }
1079187
private function _isClassInList($class, $classes)
    {
        $items = explode(" ", trim($classes));
        if (count($items) > 0) {
            foreach ($items as $item) {
                if (strcasecmp($class, trim($item)) == 0) {
                    return true;
                }
            }
        }
        return false;
    }
530323
final protected function filterFileInput(array $files)
    {
        // Cache method calls
        static $filter = null;

        if ($filter === null) {
            $filter = new NameFilter(new UniqueType());
        }

        // By reference anyway
        $filter->filter($files);
    }
1182333
public function removeAttributeClass($classes)
    {
        if ($this->offsetExists('class')) {
            if (is_string($classes)) {
                $classes = explode(',', $classes);
            }

            $classes = array_map('trim', $classes);
            $classes = array_filter($classes);

            foreach ($classes as $class) {
                if (false !== ($key = array_search($class, $this->storage[ 'class' ]))) {
                    unset($this->storage[ 'class' ][ $key ]);
                } elseif (strpos($class, '*') !== false) {
                    $class = str_replace('*', '', $class);
                    foreach ($this->storage[ 'class' ] as $key => $value) {
                        if (preg_match("/\b$class\b/i", $value)) {
                            unset($this->storage[ 'class' ][ $key ]);
                        }
                    }
                }
            }

            if (count($this->storage[ 'class' ]) == 0) {
                unset($this->storage[ 'class' ]);
            }
        }
    }
475754
public function generateProxyClasses(array $classes) : int
    {
        $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool {
            return ! ($metadata->isMappedSuperclass || $metadata->isQueryResultDocument || $metadata->getReflectionClass()->isAbstract());
        });

        foreach ($concreteClasses as $metadata) {
            $this
                ->proxyFactory
                ->createProxy(
                    $metadata->getName(),
                    static function () {
                        // empty closure, serves its purpose, for now
                    },
                    [
                        'skippedProperties' => $this->skippedFieldsFqns($metadata),
                    ]
                );
        }

        return count($concreteClasses);
    }