Retrieve the collection of helpers.

@return array
199255
public function filters()
    {
        return [
            /**
             * Convert the given string to title case.
             *
             * @return string
             */
            'title' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return mb_convert_case($text, MB_CASE_TITLE, 'UTF-8');
            },
            /**
             * Convert the given string to upper-case.
             *
             * @return string
             */
            'upper' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return mb_strtoupper($text, 'UTF-8');
            },
            /**
             * Convert the given string to lower-case.
             *
             * @return string
             */
            'lower' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return mb_strtolower($text, 'UTF-8');
            },
            /**
             * Make a string's first character uppercase.
             *
             * @return string
             */
            'ucfirst' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1, null, 'UTF-8');
            },
            /**
             * URL-encodes a string.
             *
             * @return string
             */
            'urlencode' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return urlencode($text);
            },
            /**
             * URL-encodes a string according to RFC 3986.
             *
             * @return string
             */
            'rawurlencode' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return rawurlencode($text);
            },
            /**
             * Transform URL patterns into links.
             *
             * @see https://davidwalsh.name/linkify-twitter-feed
             * @return string
             */
            'linkify' => function ($text, LambdaHelper $helper) {
                $text = $helper->render($text);

                return preg_replace('/(https?:\/\/\S+)/', '<a href="\1">\1</a>', $text);
            }
        ];
    }
373246
public function getCollections()
    {
        $cursor = $this->server->executeCommand($this->database,
            new \MongoDb\Driver\Command(['listCollections' => 1]));
        $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);

        $result = new \IteratorIterator($cursor);

        $this->queriesResultCache[ 'collectionNames' ] = [];

        foreach ($result as $collection) {
            if ($collection[ 'type' ] === 'collection') {
                $this->queriesResultCache[ 'collectionNames' ][] = $collection[ 'name' ];
            }
        }

        return $this->queriesResultCache[ 'collectionNames' ];
    }
304320
protected function generateHelpers()
    {
        $helpers = $this->handlebars->getHelpers();

        foreach ($helpers as $name => $helper) {
            $function = new ReflectionFunction($this->handlebars->getHelper($name));

            $path = $function->getFileName();
            $lines = file_get_contents($path);
            $file = new SplFileObject($path);
            $file->seek($function->getStartLine() - 2);
            $start = $file->ftell();
            $file->seek($function->getEndLine() - 1);
            $end = $file->ftell();

            $code = preg_replace(
                '/^.*?function(\s+[^\s\\(]+?)?\s*\\((.+)\\}.*?\s*$/s',
                'function($2}',
                substr($lines, $start, $end - $start)
            );

            $helpers[$name] = sprintf(self::BLOCK_OPTIONS_HASH_KEY_VALUE, $name, $code);
        }

        return $this->prettyPrint(self::BLOCK_OPTIONS_OPEN)
            . $this->prettyPrint('\r\t')
            . implode($this->prettyPrint(',\r\t'), $helpers)
            . $this->prettyPrint(self::BLOCK_OPTIONS_CLOSE);
    }
684161
protected function _collection()
    {
        if (!isset($this->_collections[$this->_collection])) {
            $this->_collections[$this->_collection] = new $this->_collectionClass($this);
        }

        return $this->_collections[$this->_collection];
    }
1300571
protected function getListCollection()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return (array) $this->collection->getList($conditions);
    }
616288
public function getDecorators()
    {
        $found = array($this);
        if (method_exists($this->decoratedBatch, 'getDecorators')) {
            $found = array_merge($found, $this->decoratedBatch->getDecorators());
        }

        return $found;
    }
1066076
public function getFunctions()
    {
        return array_merge(parent::getFunctions(), [
            new \Twig_SimpleFunction('getBlockElementsHtml', [$this, 'getBlockElementsHtml'], ['is_safe' => ['html']]),
            new \Twig_SimpleFunction('getElementHtml', [$this, 'getElementHtml'], ['is_safe' => ['html']]),
            new \Twig_SimpleFunction('getCollectionPages', [$this, 'getCollectionPages']),
            new \Twig_SimpleFunction('getGallery', [$this, 'getGallery']),
        ]);
    }
766662
public function getFunctions()
    {
        return [
            new \Twig_SimpleFunction('isEager', function($stuff) {
                return AgnosticFetchHelper::isEager($stuff);
            }),
            new \Twig_SimpleFunction('all', function($stuff) {
                return AgnosticFetchHelper::all($stuff);
            }),
            new \Twig_SimpleFunction('one', function($stuff) {
                return AgnosticFetchHelper::one($stuff);
            }),
            new \Twig_SimpleFunction('nth', function($stuff, $n) {
                return AgnosticFetchHelper::nth($stuff, $n);
            }),
            new \Twig_SimpleFunction('ids', function($stuff) {
                return AgnosticFetchHelper::ids($stuff);
            }),
            new \Twig_SimpleFunction('count', function($stuff) {
                return AgnosticFetchHelper::count($stuff);
            }),
        ];
    }
372992
public static function getHelpers(HandlebarsData $data = null)
    {
        if (is_null($data)) {
            return self::$helpers;
        }
        
        $helpers = [];
        
        foreach (self::$helpers as $name => $helper) {
            if ($helper instanceof Closure) {
                $helpers[$name] = $helper->bindTo($data, get_class($data));
            }
        }
        
        return $helpers;
    }
78916
public function getCategoriesPlain() : Collection
    {
        static $categories;

        if ($categories) {
            return $categories;
        }

        $categories = [];
        $languages = TransHelper::getAllLanguages();

        foreach (Category::all() as $category) {
            $categoryData = [
                'id'        => $category->id,
                'parent_id' => $category->parent_id,
                'slugs'     => [],
            ];

            foreach ($languages as $language) {
                $translation = $category->translations->where('locale', $language->iso_code)->first();
                $slug = object_get($translation, 'slug');

                $categoryData['slugs'][$language->iso_code] = $slug;
            }

            $categories[] = $categoryData;
        }

        $categories = collect($categories);

        return $categories;
    }
1005799
public function getCollection()
    {
        if (! isset($this->collection)) {
            return str_replace(
                '\\', '', Str::snake(Str::plural(class_basename($this)))
            );
        }

        return $this->collection;
    }
1342749
public function getHandlers()
    {
        $handlers = [];
        foreach ($this->handlers as $key => $handler) {
            $handlers[$key] = $handler->getCallable();
        }

        return $handlers;
    }
503512
public function helpers($helpers = null)
    {
        deprecationWarning(
            'Email::helpers() is deprecated. Use $email->viewBuilder()->getHelpers()/setHelpers() instead.'
        );

        if ($helpers === null) {
            return $this->getHelpers();
        }

        return $this->setHelpers((array)$helpers);
    }
327084
public function getItems()
    {
        return [
            'items' => array_map(function ($item) {
                return $item->fill()->attributes;
            }, array_merge($this->lfm->folders(), $this->lfm->files())),
            'display' => $this->helper->getDisplayMode(),
            'working_dir' => $this->lfm->path('working_dir'),
        ];
    }
1854
public function getItemProviders()
    {
        foreach ($this->modules->enabled() as $module) {
            $name = studly_case($module->getName());
            $class = 'Modules\\'.$name.'\\MenuExtenders\\MenuExtender';

            if (class_exists($class)) {
                $extender = $this->container->make($class);
                $this->extenders->put($module->getName(), [
                    'content' => $extender->getContentItems(),
                    'static'  => $extender->getStaticItems(),
                ]);
            }
        }

        return $this->extenders;
    }
1101186
public function listGetters()
	{
		$data = config('getters.uf');
		$getters = [];
		foreach ($data as $get) {
			$getters []= new $get['class']();
		}
		return $getters;
	}
369049
protected function getControllers()
    {
        $controllers = new Collection;

        if ($controller = $this->option('use-controller')) {
            $this->addControllerIfNotExists($controllers, app($controller));

            return $controllers;
        }

        foreach ($this->router->getRoutes() as $collections) {
            foreach ($collections as $route) {
                if ($controller = $route->getControllerInstance()) {
                    $this->addControllerIfNotExists($controllers, $controller);
                }
            }
        }

        return $controllers;
    }