最近一段时间在使用Laravel,laravel中推荐了一个
<?php namespace PHPSTORM_META { // registerArgumentsSet('monolog_levels', // \Monolog\Logger::DEBUG, // \Monolog\Logger::INFO, // \Monolog\Logger::NOTICE, // \Monolog\Logger::WARNING, // \Monolog\Logger::ERROR, // \Monolog\Logger::CRITICAL, // \Monolog\Logger::ALERT, // \Monolog\Logger::EMERGENCY // ); // expectedArguments(\addRecord(), 0, argumentsSet('monolog_levels')); //override(\BusinessService\Client\Service\BsService::ca(0), type(0)); override(\BusinessService\Client\Service\BsService::user(), map([ // '' => 'User', '' => \User::class ])); override(\BusinessService\Client\Service\BsService::goods(), map([ '' => 'Goods' ])); } class User { public function add(string $username, string $password) { } public function del(int $id) { } } class Goods { public function detail(int $id) { } }
调用方式:
use BusinessService\Client\Service\BsService; BsService::user()->add('user','james'); BsService::goods()->detail(1);
使用效果:
未完待续。。。