Apply a filter to all subtables contained by this instance.

@param string|Closure $className Name of filter class or a Closure.
@param array $parameters Parameters to pass to the filter.
438076
public function filterSubtables($className, $parameters = array())
    {
        foreach ($this->getDataTables() as $table) {
            $table->filterSubtables($className, $parameters);
        }
    }
929337
public function registerCollectorClass($className)
    {
        /** @var CollectorInterface $collector */
        $collector = new $className($this->context->getProcess(), $this->datasource);
        $this->registerCollector($collector);
    }
1027722
protected void defineFilter(Context ctx, String name,
      String classname, Map<String,String> parameters, String[] urls) {

    FilterHolder holder = new FilterHolder();
    holder.setName(name);
    holder.setClassName(classname);
    holder.setInitParameters(parameters);
    FilterMapping fmap = new FilterMapping();
    fmap.setPathSpecs(urls);
    fmap.setDispatches(Handler.ALL);
    fmap.setFilterName(name);
    ServletHandler handler = ctx.getServletHandler();
    handler.addFilter(holder, fmap);
  }
794701
public static function register($className, $parameters)
    {
        /**
         * If the class is already register, we throw an exception
         * Maybe it's not the best idea, because it makes it not overridable, time will tell
         */
        if (isset(static::$registeredClasses[$className])) {
            throw new Exception("The class $className is already registered");
        }
        static::$registeredClasses[$className] = $parameters;
    }
871188
protected function createFormInstance(string $className, array $params)
    {
        $result = new $className ($this->getTranslator(), $this->getValidator(), $this->getOptions(), $params);

        return $result;
    }
698341
public static function addMethodAnnotations($className, $methodName, ...$annotations)
    {
        if(isset(static::$annotations[$className]['Methods'][$methodName]))
        {
            static::$annotations[$className]['Methods'][$methodName] = array_merge(static::$annotations[$className]['Methods'][$methodName], $annotations);
        }
        else
        {
            static::$annotations[$className]['Methods'][$methodName] = $annotations;
        }
        foreach($annotations as $annotation)
        {
            static::$annotationRelation[get_class($annotation)]['Method'][] = [
                'type'      =>  'Method',
                'class'     =>  $className,
                'method'    =>  $methodName,
                'annotation'=>  $annotation,
            ];
        }
    }
1348965
private function getNamedArguments($className, $functionName, array $arguments)
    {
        $fullFunctionName = $this->getFullFunctionName($className, $functionName);

        if (empty($this->functionArgumentsCache[$fullFunctionName])) {
            $this->functionArgumentsCache[$fullFunctionName] =
                $this->buildReflectionFunction($className, $functionName)->getParameters();
        }

        $i              = 0;
        $namedArguments = array();
        foreach ($this->functionArgumentsCache[$fullFunctionName] as $parameter) {
            /** @var ReflectionParameter $parameter */
            try {
                $defaultValue = '[defaultValue:' . $this->sanitize($parameter->getDefaultValue()) . ']';
            } catch (ReflectionException $e) {
                $defaultValue = '';
            }

            $namedArguments[$parameter->getName()] = isset($arguments[$i])
                ? $arguments[$i]
                : $defaultValue;
            $i++;
        }

        return $namedArguments;
    }
1216996
private function exists($className, $functionName)
    {
        return
            function_exists($this->getFullFunctionName($className, $functionName))
            || method_exists($className, $functionName);
    }
1013516
protected function callClassBasedExtension($callback, $parameters)
    {
        list($class, $method) = explode('@', $callback);

        return call_user_func_array([$class, $method], $parameters);
    }
394286
public static function bindStatic($className, $methodName, $args = null)
    {
        if (empty($args)) {
            $args = null;
        }
        $native = [$className, $methodName];
        $callback = function () use ($native, $args) {
            $a = func_get_args();
            if ($args !== null) {
                $a = array_merge($a, $args);
            }
            return call_user_func_array($native, $a);
        };
        return $callback->bindTo(null, $className);
    }
1221475
protected function mapToClass($propertyName, $className, \Closure $callback)
    {
        $temporary = new GenericDataMapper($this->resolver);
        $callback($temporary);
        if (!is_null($className)) {
            $temporary->toClassName                     = $className;
        }
        $this->properties[]                       = $propertyName;
        $this->propertiesToClasses[$propertyName] = $temporary;

        return $this;
    }
505936
public function setEndpointParameters($endpointName, array $parameters)
    {
        /** @var AbstractSearchEndpoint $endpoint */
        $endpoint = $this->getEndpoint($endpointName);
        $endpoint->setParameters($parameters);
    }
450372
protected function processFilters($parameters)
    {
        if (isset($parameters['filter'])) {
            $filters = $parameters['filter'];
            unset($parameters['filter']);
            foreach ($filters as $filter => $value) {
                $parameters['filter[' . $filter . ']'] = $value;
            }
        }

        return $parameters;
    }
305988
protected function setParameters(array $parameters = array())
    {
        foreach ($parameters as $parameterKey => $parameterValue) {
            $this->container->setParameter($parameterKey, $parameterValue);
        }
    }
772055
public function load($className) {
        if (class_exists($className, FALSE) || interface_exists($className, FALSE)) {
            return;
        }

        foreach ($this->dirs as $dir) {
            if ($this->loadClass($this->basePath . DIRECTORY_SEPARATOR . $dir, $className)) {
                return;
            }
    	}
    }
464260
protected function applyFilters(&$propertyData, array $filterClasses)
    {
        /** @var FilterInterface $filter */
        foreach ($filterClasses as $filterClass => $filterClassArguments) {
            $filter = new $filterClass(...$filterClassArguments);

            if (!($filter instanceof FilterInterface)) {
                throw new \RuntimeException(sprintf('Filter %s must implement %s interface',
                    $filterClass, FilterInterface::class));
            }

            $propertyData = $filter->apply($propertyData);
        }
        
        return $propertyData;
    }
84542
public static function query(string $className): QueryBuilder
    {
        $instance = self::getInstance($className);

        return Query::table($className)->className($className)->selectInstance($instance);
    }