<?php

namespace App\Modules;


trait BaseService
{
    private static $_instance;

    public static function __callStatic($name, $arguments)
    {
        $name = preg_replace('/Static$/', '', $name);
        if (self::$_instance == null) {
            self::$_instance = new self;
        }
        return self::$_instance->$name(...$arguments);
    }
}
