Call the given controller filter method.

@param  array  $filter
@param  \Illuminate\Routing\Route  $route
@param  \Illuminate\Http\Request   $request
@return mixed
761564
protected function callFilter($filter, $route, $request)
    {
        return $this->callRouteFilter(
            $filter['filter'], $filter['parameters'], $route, $request
        );
    }
773422
private function extractFunctionFromRoute(Route $route)
    {
        $controller = explode('::', $this->extractControllerDefaultFromRoute($route));

        return isset($controller[1]) ? $controller[1] : null;
    }
857377
protected function filter(array $filter)
    {
        // email
        if(array_key_exists('authEmail', $filter) && strlen($filter['authEmail']) > 0) {
            $this->select->where->like('auth.auth_email', $filter['authEmail'] . '%');
        }
        
        //auth id
        if(array_key_exists('authId', $filter) && $filter['authId'] > 0) {
            $this->select->where(array(
                'history.auth_id = ?' => $filter['authId']
            ));
        }
        
        return $this;
    }
999396
public function directCreateAction(Request $request)
    {
        $filter = new Filter();
        $filter->setName($request->request->get('filter_name'));
        $filter->setDescription($request->request->get('filter_description'));
        $filter->setState($request->request->getBoolean('filter_public') ? FilterStateEnum::ALL : FilterStateEnum::SELF);
        $filter->setCreatorUsername($this->getUser()->getUsername());

        $filter->setRoute($request->request->get('filter_route'));
        $filter->setArguments(json_decode($request->request->get('filter_route_arguments'), true));
        $filter->setConditions(json_decode($request->get('filter_conditions'), true));

        if (!is_array($filter->getConditions()) || !is_array($filter->getArguments())) {
            throw new BadRequestHttpException();
        }

        if ($this->router->getRouteCollection()->get($filter->getRoute()) === null) {
            throw new BadRequestHttpException();
        }

        $this->entityManager->persist($filter);
        $this->entityManager->flush();

        return $this->redirect($this->router->generate(
            $filter->getRoute(),
            array_merge($filter->getArguments(), $filter->getConditions())
        ));
    }
889631
public function getFilter(\Zend_Controller_Request_Abstract $request, array $filter = array(), $dateField = null)
    {
        $this->_actionKey = $request->getActionKey();

        // \MUtil_Echo::r($filter, __CLASS__ . '->' . __FUNCTION__ .' 1');
        $filter = $this->processFilter($request, $filter);

        if ($filter) {
            $model = $this->getModel();
            $model->addFilter($filter);
        }
        // \MUtil_Echo::r($filter, __CLASS__ . '->' . __FUNCTION__ . ' 2');
        $newfilter = $filter;

        if ($this->dateCurrentStart && $this->dateCurrentEnd) {
            if (null === $dateField) {
                $dateField = $this->dateFrom;
            }
            $start = $this->dateCurrentStart->getIso();
            $end   = $this->dateCurrentEnd->getIso();
            $newfilter[] = "$dateField BETWEEN '$start' AND '$end'";
        }

        if ($this->dateGroup) {
            $fields = $this->getFields();
            if (isset($fields[$this->dateGroup])) {
                if ($groupfilter = $fields[$this->dateGroup]->getFilter()) {
                    $newfilter[] = $groupfilter;
                }
            }
        }

        return $newfilter;
    }
1049281
public function applyFilters(IRoute $route) {
        foreach ($this->getFilters() as $filter) {
            if ($filter->isEnabled()) {
                $invoker = $this->getFilterInvoker();
                $result = $invoker->invoke($filter->getFilter(), $route);

                if (is_bool($result)) {
                    return $result;
                }
            }
        }

        return true;
    }
1180055
public function resource($route, $controller, $filter = null)
    {
        $this->register('get', $route, [$controller, 'index'], $filter);
        $this->register('get', $route . '/{id}', [$controller, 'show'], $filter);
        $this->register('post', $route, [$controller, 'store'], $filter);
        $this->register('put', $route . '/{id}', [$controller, 'update'], $filter);
        $this->register('delete', $route . '/{id}', [$controller, 'destroy'], $filter);
        return true;
    }
743849
public function filter($filter = 'image.filters.default')
    {
        $filters = (array) $this->get($filter, []);
        foreach ($filters as $params) {
            $params = (array) $params;
            $method = array_shift($params);
            $this->__call($method, $params);
        }
    }
709705
public function route(Request $request)
    {
        foreach ($this->getRouterList() as $router) {
            if ($router->getAPIClient()->shouldRouteRequest($request)) {
                return $router->route($request);
            }
        }

        return;
    }
282582
public static route[] get_filtered(nitro_service service, String filter) throws Exception{
		route obj = new route();
		options option = new options();
		option.set_filter(filter);
		route[] response = (route[]) obj.getfiltered(service, option);
		return response;
	}
463200
public function executeFilters(Request $request, Response $response)
    {
        $middlewares = $this->filterMiddleware(Filter::class);

        foreach ($middlewares as $middleware) {
            if (($returnResponse = $middleware->doFilter($request, $response)) !== null) {
                return $returnResponse;
            }
            unset($returnResponse);
        }

        unset($middlewares);
    }
599529
public function dispatch($route, $controller, $method)
    {
        if (method_exists($controller, $method)) {
            return $this->container->call(
                [$controller, $method],
                $this->getMethodArguments($route)
            );
        }

        return $controller->missingMethod($method);
    }
1312887
public function filterAction(array $filter)
    {
        $this->checkStaticTemplateIsIncluded();

        $arguments = $this->request->getArguments();

        $filtertext = $this->arrayToFiltertext($filter);

        $arguments['filter'] = $filtertext;

        $this->redirect('dynamic', null, null, $arguments);
    }
197607
protected function getRouteInformation(Route $route, $filter, $namespace): ?array
    {
        $uri = $route->uri();
        $host = $route->domain();
        $name = $route->getName();
        $laroute = $route->getAction('laroute');

        switch ($filter) {
            case 'all':
                if ($laroute === false) {
                    return null;
                }
                break;
            case 'only':
                if ($laroute !== true) {
                    return null;
                }
                break;
        }

        return compact('host', 'uri', 'name');
    }
1344337
protected function filterApplies($filter, $request, $method)
	{
		foreach (array('Only', 'Except', 'On') as $type)
		{
			if ($this->{"filterFails{$type}"}($filter, $request, $method))
			{
				return false;
			}
		}

		return true;
	}
1244354
protected function dispatchMethod($request, $route)
    {
        list($path, $var) = $this->parseUrlPath($route);

        $route = str_replace('/', '@', implode('/', $path));
        $method = strpos($route, '@') ? explode('@', $route) : $route;

        return new CallbackDispatch($request, $this, $method, $var);
    }
1229898
protected function applyFilter(array $responseArray, array $filter)
    {
        $arrayIntersect = null;
        //Check if its a sequential array. Presence of sequential arrays mean that the filed is a collection
        //and the filtering will be applied to all the collection items
        if (!(bool)count(array_filter(array_keys($responseArray), 'is_string'))) {
            foreach ($responseArray as $key => &$item) {
                $arrayIntersect[$key] = $this->recursiveArrayCompare($item, $filter);
            }
        } else {
            $arrayIntersect = $this->recursiveArrayCompare($responseArray, $filter);
        }
        return $arrayIntersect;
    }