lib/Doctrine/ORM/Configuration.php
public function addCustomStringFunction(string $functionName, $classNameOrFactory) : void
    {
        $this->customStringFunctions[strtolower($functionName)] = $classNameOrFactory;
    }
public function addCustomStringFunction(string $functionName, $classNameOrFactory) : void
    {
        $this->customStringFunctions[strtolower($functionName)] = $classNameOrFactory;
    }
public function addCustomStringFunction ( string $ functionName , $ classNameOrFactory ) : void { $ this -> customStringFunctions [ strtolower ( $ functionName ) ] = $ classNameOrFactory ; }
Registers a custom DQL function that produces a string value.
Such a function can then be used in any DQL statement in any place where string
functions are allowed.

DQL function names are case-insensitive.

@param string|callable $classNameOrFactory Class name or a callable that returns the function.
Registers a custom DQL function that produces a string value . Such a function can then be used in any DQL statement in any place where string functions are allowed .