add filter to datatables

@param String $classname
@return \Antares\Datatables\Html\Builder
547115
public function addFilter($classname, $query)
    {
        $filterClass = is_object($classname) ? get_class($classname) : $classname;
        if (!class_exists($filterClass)) {
            return $this;
        }
        $filter = str_slug(class_basename($filterClass));
        $path   = uri();
        $this->dispatcher->fire("datatables:filters.{$path}.{$filter}.before", [$this->filterAdapter, $query]);
        $this->dispatcher->fire(new BeforeFilters($path, $filter, $this->filterAdapter, $query));
        $this->filterAdapter->add($classname);
        $this->dispatcher->fire("datatables:filters.{$path}.{$filter}.after", [$this->filterAdapter, $query]);
        $this->dispatcher->fire(new AfterFilters($path, $filter, $this->filterAdapter, $query));
        return $this;
    }
1172535
public function setQueryClass($className)
    {
        if ($this->queryClass !== $className && !$this->isQueryOrScan()) {
            throw ODMException::queryOperationAlreadySet($this->queryClass);
        }

        $this->queryClass = $className;

        return $this;
    }
224086
public function getEntityHydrator($className)
    {
        if (!array_key_exists($className, $this->entityHydrators)) {
            $this->entityHydrators[$className] = new EntityHydrator($className, $this);
        }

        return $this->entityHydrators[$className];
    }
1172151
public function asSharedInstanceOf($className)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_SHARED;
        $endPoint['className'] = $className;

        return $this;
    }
251129
public function compose($classname)
    {
        if (!class_exists($classname)) {
            return false;
        }
        $instance = $this->app->make($classname);
        $params   = $instance->getAttribute('boot');
        $group    = array_get($params, 'group');

        $this->app->instance($group, app('antares.widget')->make($group));

        app('view')->composer(array_get($params, 'on'), function() use($instance, $group, $params) {

            if (!Registry::isRegistered('menu.' . $group)) {
                $instance->__construct($this->app, $group);
                $instance->handle();
                Registry::set('menu.' . $group, $instance);
            }
            $this->content($params);
        });
    }
594333
protected function buildJoinTableColumnName($className)
    {
        if (preg_match('/^(?P<PackageNamespace>\w+(?:\\\\\w+)*)\\\\Domain\\\\Model\\\\(?P<ModelNamePrefix>(\w+\\\\)?)(?P<ModelName>\w+)$/', $className, $matches)) {
            $packageNamespaceParts = explode('\\', $matches['PackageNamespace']);
            $tableName = strtolower(strtr($packageNamespaceParts[count($packageNamespaceParts) - 1], '\\', '_') . ($matches['ModelNamePrefix'] !== '' ? '_' . strtr(rtrim($matches['ModelNamePrefix'], '\\'), '\\', '_') : '') . '_' . $matches['ModelName']);
        } else {
            $classNameParts = explode('\\', $className);
            $tableName = strtolower($classNameParts[1] . '_' . implode('_', array_slice($classNameParts, -2, 2)));
        }

        return $this->truncateIdentifier($tableName);
    }
799937
public function toggleClass($classname)
    {
        $classes = explode(' ', $classname);
        foreach ($this as $i => $node) {
            $c = self::create($node);
            /** @var \DOMNode $node */
            foreach ($classes as $class) {
                if ($c->hasClass($class)) {
                    $c->removeClass($class);
                } else {
                    $c->addClass($class);
                }
            }
        }
        return $this;
    }
1181196
public function loadClass($className)
    {
        foreach ($this->maps as $name => $path) {
            if (strtolower($name) == strtolower($className)) {
                $this->requireFile($this->maps[$name]);

                break;
            }
        }

        return $this;
    }
1362089
public function filter($className, $parameters = array())
    {
        foreach ($this->getDataTables() as $table) {
            $table->filter($className, $parameters);
        }
    }
308968
public function load($className)
    {
        // Create reflection
        $this->reflection = new \ReflectionClass($className);

        // Read annotations
        $this->reader = $this->annotation->get($className);

        // Save the class name
        $this->className = $className;

        return $this;
    }
877278
protected function helper($classname) {

		$directories 	= explode('.', $classname); //Convert dots to directory seperators
		$amount 		= count($directories) - 1;
		$namespace 		= Router :: getRoute() -> getModule() . '\\' . str_replace(DIRECTORY_SEPARATOR, '\\', Application :: get(['directory', 'helper']));

		foreach($directories as $index => $directory) {

			if($amount === $index) {
				
				$namespace .= Application :: get(['prefix', 'helper']) . $directory;
				break;
			}

			$namespace 	.= $directory . '\\';
		}

		return new $namespace;
	}
516371
protected function createClass(string $className)
    {
        if (!class_exists($className)) {
            throw new class("The class $className does not exists") extends Exception implements
                NotFoundExceptionInterface {
            };
        }

        $reflection = new ReflectionClass($className);

        if ($reflection->hasMethod('__construct')) {
            return $reflection->newInstanceArgs($this->arguments);
        }

        return $reflection->newInstance();
    }
6979
public function buildFromClass($classname)
	{
		$reflectionClass = new ReflectionClass($classname);

		$classDefinition = new ClassDefinition();
		$classDefinition->name = $reflectionClass->getName();
		$classDefinition->namespace = $reflectionClass->getNamespaceName();

		$reflectionProperties = $this->classPropertyFinder->findProperties($reflectionClass);

		foreach ($reflectionProperties as $reflectionProperty) {
			$classDefinition->properties[$reflectionProperty->getName()] = $this->buildPropertyDefinition($reflectionProperty);
		}

		return $classDefinition;
	}
625726
public static function create( $className = null )
    {
        if ( is_null( $className ) )
        {
            $ini = eZINI::instance( 'ezcomments.ini' );
            $className = $ini->variable( 'NotificationSettings', 'NotificationManagerClass' );
        }
        return  new $className();
    }
162961
public function create(string $className, string $typeName): Type
    {
        $description = 'To be used as a filter for objects of type `' . Utils::getTypeName($className) . '`';

        $fieldsGetter = function () use ($className, $typeName): array {
            $configuration = [
                [
                    'name' => 'groups',
                    'type' => Type::listOf(Type::nonNull($this->getGroupType($className, $typeName))),
                ],
            ];

            return $configuration;
        };

        $filterType = new InputObjectType([
            'name' => $typeName,
            'description' => $description,
            'fields' => $fieldsGetter,
        ]);
        $this->types->registerInstance($filterType);

        return $filterType;
    }
563434
public function buildObjectArray(array $data, $classname)
    {
        $objects = array();
        foreach ($data as $object) {
          $objects[] = new $classname($object);
        }
        return $objects;
    }
604630
public function addClass( $className, $parameters = array() )
	{
		$object	= Alg_Object_Factory::createObject( $className, $parameters );
		$this->addObject( $object );
	}