private static function filters($actionContext) {
        $allFilters = InternalHelper::getStaticPropertyValue('\\PhpMvc\\Filter', 'filters');
        $allFiltersInstance = array();

        foreach ($allFilters as $actionName => $filters) {
            foreach ($filters as $filterName) {
                $className = $filterName;

                if (!class_exists($className)) {
                    $className = '\\' . PHPMVC_APP_NAMESPACE . '\\Filters\\' . $className;

                    if (!class_exists($className)) {
                        throw new \Exception('Filter "' . $filterName . '" not found.');
                    }
                }

                $filterClass = new \ReflectionClass($className);

                if (!$filterClass->isSubclassOf('\\PhpMvc\\ActionFilter')) {
                    throw new \Exception('The filter type must be the base of "\PhpMvc\ActionFilter".');
                }

                if ($filterClass->getConstructor() != null) {
                    $filterInstance = $filterClass->newInstance();
                }
                else {
                    $filterInstance = $filterClass->newInstanceWithoutConstructor();
                }

                $allFiltersInstance[] = $filterInstance;
            }
        }

        InternalHelper::setPropertyValue($actionContext, 'filters', $allFiltersInstance);
    }
private static function filters($actionContext) {
        $allFilters = InternalHelper::getStaticPropertyValue('\\PhpMvc\\Filter', 'filters');
        $allFiltersInstance = array();

        foreach ($allFilters as $actionName => $filters) {
            foreach ($filters as $filterName) {
                $className = $filterName;

                if (!class_exists($className)) {
                    $className = '\\' . PHPMVC_APP_NAMESPACE . '\\Filters\\' . $className;

                    if (!class_exists($className)) {
                        throw new \Exception('Filter "' . $filterName . '" not found.');
                    }
                }

                $filterClass = new \ReflectionClass($className);

                if (!$filterClass->isSubclassOf('\\PhpMvc\\ActionFilter')) {
                    throw new \Exception('The filter type must be the base of "\PhpMvc\ActionFilter".');
                }

                if ($filterClass->getConstructor() != null) {
                    $filterInstance = $filterClass->newInstance();
                }
                else {
                    $filterInstance = $filterClass->newInstanceWithoutConstructor();
                }

                $allFiltersInstance[] = $filterInstance;
            }
        }

        InternalHelper::setPropertyValue($actionContext, 'filters', $allFiltersInstance);
    }
private static function filters ( $ actionContext ) { $ allFilters = InternalHelper :: getStaticPropertyValue ( '\\PhpMvc\\Filter' , 'filters' ) ; $ allFiltersInstance = array ( ) ; foreach ( $ allFilters as $ actionName => $ filters ) { foreach ( $ filters as $ filterName ) { $ className = $ filterName ; if ( ! class_exists ( $ className ) ) { $ className = '\\' . PHPMVC_APP_NAMESPACE . '\\Filters\\' . $ className ; if ( ! class_exists ( $ className ) ) { throw new \ Exception ( 'Filter "' . $ filterName . '" not found.' ) ; } } $ filterClass = new \ ReflectionClass ( $ className ) ; if ( ! $ filterClass -> isSubclassOf ( '\\PhpMvc\\ActionFilter' ) ) { throw new \ Exception ( 'The filter type must be the base of "\PhpMvc\ActionFilter".' ) ; } if ( $ filterClass -> getConstructor ( ) != null ) { $ filterInstance = $ filterClass -> newInstance ( ) ; } else { $ filterInstance = $ filterClass -> newInstanceWithoutConstructor ( ) ; } $ allFiltersInstance [ ] = $ filterInstance ; } } InternalHelper :: setPropertyValue ( $ actionContext , 'filters' , $ allFiltersInstance ) ; }
Initializes the filters.

@return void
Initializes the filters .