Skip to content

Helper Service

The helper service uses the Phalcon Helper Component

Configurations

# no ini configuration available yet

Helper Service Provider

PROVIDER_HELPER=\Zemit\Provider\Helper\ServiceProvider

Helper Configurations Object

<?php
new Config([
    'providers' => [
        \Zemit\Provider\Helper\ServiceProvider::class => Env::get('PROVIDER_HELPER', \Zemit\Provider\Helper\ServiceProvider::class),
    ],
    'helpers' => [
        // add your own helpers here
    ],
]);

Helper Service (helper)

Helper Service Provider

Helper Service Provider (helper): \Zemit\Provider\Helper\ServiceProvider

<?php
// Retrieving the service from an Injectable
$helper = $this->helper;

// Retrieving the service from the DI
$helper = $this->di->get('helper');

// Retrieving the service from the getDI()
$helper = $this->getDI()->get('helper');

// Retrieving the service from anywhere
$helper = Di::getDefault()->get('helper');