Airship\Engine\Gears::forge PHP Method

forge() public static method

Add a new type to the Gears registry
public static forge ( string $index, string $type ) : boolean
$index string
$type string
return boolean
    public static function forge(string $index, string $type) : bool
    {
        $state = State::instance();
        if (!isset($state->gears[$index])) {
            $gears = $state->gears;
            if (\class_exists($type)) {
                $gears[$index] = $type;
                $state->gears = $gears;
                return true;
            }
        }
        return false;
    }