src/Utility.php
public static function instance(Utility $utility = null)
    {
        if ($utility instanceof Utility) {
            static::$instance = $utility;
        }

        if (empty(static::$instance)) {
            static::$instance = new static();
        }

        return static::$instance;
    }
public static function instance(Utility $utility = null)
    {
        if ($utility instanceof Utility) {
            static::$instance = $utility;
        }

        if (empty(static::$instance)) {
            static::$instance = new static();
        }

        return static::$instance;
    }
public static function instance ( Utility $ utility = null ) { if ( $ utility instanceof Utility ) { static :: $ instance = $ utility ; } if ( empty ( static :: $ instance ) ) { static :: $ instance = new static ( ) ; } return static :: $ instance ; }
Returns the globally available instance of a Search\Utility.

@param \Search\Utility|null $utility Utility instance
@return static The global search utility
Returns the globally available instance of a Search \ Utility .