This package is abandoned and no longer maintained. The author suggests using the tobento/service-helper-function package instead.

Support for helper functions management.

1.0.3 2021-06-16 10:40 UTC

This package is auto-updated.

Last update: 2021-06-16 10:41:57 UTC


With the HelperFunction Service you can easily manage your helper functions.

Table of Contents

Getting started

Add the latest version of the HelperFunction service running this command.

composer require tobento/service-helper-function


  • PHP 8.0 or greater


  • Framework-agnostic, will work with any project


Here is a example of how to use the HelperFunction service.

// Create Functions.
$functions = new Functions();

// Set any data for later usage for your functions.
$functions->set('sitename', 'Your Sitename');

// Register a function file.

// Calling the function registered.
var_dump(sitename()); // string(13) "Your Sitename"

// Get the key set.
$keys = $functions->getKeys(); // ['sitename']

functions.php file example.

use Tobento\Service\HelperFunction\Functions;

if (!function_exists('sitename'))
    function sitename(): string
        // Get the data from the Functions.
        return Functions::get('sitename');