protected function findCategoriesByPattern($pattern)
    {
        return $this->findAllCategories()
            ->then(function($categories) use ($pattern) {
                $matches = [];
                foreach ($categories as $category) {
                    if (Reaction\Helpers\StringHelper::matchWildcard($pattern, $category)) {
                        $matches[] = $category;
                    }
                }
                return $matches;
            });
    }
protected function findCategoriesByPattern($pattern)
    {
        return $this->findAllCategories()
            ->then(function($categories) use ($pattern) {
                $matches = [];
                foreach ($categories as $category) {
                    if (Reaction\Helpers\StringHelper::matchWildcard($pattern, $category)) {
                        $matches[] = $category;
                    }
                }
                return $matches;
            });
    }
protected function findCategoriesByPattern ( $ pattern ) { return $ this -> findAllCategories ( ) -> then ( function ( $ categories ) use ( $ pattern ) { $ matches = [ ] ; foreach ( $ categories as $ category ) { if ( Reaction \ Helpers \ StringHelper :: matchWildcard ( $ pattern , $ category ) ) { $ matches [ ] = $ category ; } } return $ matches ; } ) ; }
Find categories by string pattern|wildcard
@param string $pattern
@return ExtendedPromiseInterface
Find categories by string pattern|wildcard