_ide_helper.php 144 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665
  1. <?php
  2. // @formatter:off
  3. /**
  4. * A helper file for Laravel 5, to provide autocomplete information to your IDE
  5. * Generated for Laravel Lumen (6.2.0) (Laravel Components ^6.0) on 2019-12-26 14:44:52.
  6. *
  7. * This file should not be included in your code, only analyzed by your IDE!
  8. *
  9. * @author Barry vd. Heuvel <barryvdh@gmail.com>
  10. * @see https://github.com/barryvdh/laravel-ide-helper
  11. */
  12. namespace Illuminate\Support\Facades {
  13. /**
  14. *
  15. *
  16. * @method staticsss \Illuminate\Contracts\Auth\Authenticatable loginUsingId(mixed $id, bool $remember = false)
  17. * @method staticsss bool viaRemember()
  18. * @method staticsss \Symfony\Component\HttpFoundation\Response|null onceBasic(string $field = 'email',array $extraConditions = [])
  19. * @method staticsss bool|null logoutOtherDevices(string $password, string $attribute = 'password')
  20. * @see \Illuminate\Auth\AuthManager
  21. * @see \Illuminate\Contracts\Auth\Factory
  22. * @see \Illuminate\Contracts\Auth\Guard
  23. * @see \Illuminate\Contracts\Auth\StatefulGuard
  24. */
  25. class Auth {
  26. /**
  27. * Attempt to get the guard from the local cache.
  28. *
  29. * @param string|null $name
  30. * @return \Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
  31. * @staticsss
  32. */
  33. public static function guard($name = null)
  34. {
  35. /** @var \Illuminate\Auth\AuthManager $instance */
  36. return $instance->guard($name);
  37. }
  38. /**
  39. * Create a session based authentication guard.
  40. *
  41. * @param string $name
  42. * @param array $config
  43. * @return \Illuminate\Auth\SessionGuard
  44. * @staticsss
  45. */
  46. public static function createSessionDriver($name, $config)
  47. {
  48. /** @var \Illuminate\Auth\AuthManager $instance */
  49. return $instance->createSessionDriver($name, $config);
  50. }
  51. /**
  52. * Create a token based authentication guard.
  53. *
  54. * @param string $name
  55. * @param array $config
  56. * @return \Illuminate\Auth\TokenGuard
  57. * @staticsss
  58. */
  59. public static function createTokenDriver($name, $config)
  60. {
  61. /** @var \Illuminate\Auth\AuthManager $instance */
  62. return $instance->createTokenDriver($name, $config);
  63. }
  64. /**
  65. * Get the default authentication driver name.
  66. *
  67. * @return string
  68. * @staticsss
  69. */
  70. public static function getDefaultDriver()
  71. {
  72. /** @var \Illuminate\Auth\AuthManager $instance */
  73. return $instance->getDefaultDriver();
  74. }
  75. /**
  76. * Set the default guard driver the factory should serve.
  77. *
  78. * @param string $name
  79. * @return void
  80. * @staticsss
  81. */
  82. public static function shouldUse($name)
  83. {
  84. /** @var \Illuminate\Auth\AuthManager $instance */
  85. $instance->shouldUse($name);
  86. }
  87. /**
  88. * Set the default authentication driver name.
  89. *
  90. * @param string $name
  91. * @return void
  92. * @staticsss
  93. */
  94. public static function setDefaultDriver($name)
  95. {
  96. /** @var \Illuminate\Auth\AuthManager $instance */
  97. $instance->setDefaultDriver($name);
  98. }
  99. /**
  100. * Register a new callback based request guard.
  101. *
  102. * @param string $driver
  103. * @param callable $callback
  104. * @return \Illuminate\Auth\AuthManager
  105. * @staticsss
  106. */
  107. public static function viaRequest($driver, $callback)
  108. {
  109. /** @var \Illuminate\Auth\AuthManager $instance */
  110. return $instance->viaRequest($driver, $callback);
  111. }
  112. /**
  113. * Get the user resolver callback.
  114. *
  115. * @return \Closure
  116. * @staticsss
  117. */
  118. public static function userResolver()
  119. {
  120. /** @var \Illuminate\Auth\AuthManager $instance */
  121. return $instance->userResolver();
  122. }
  123. /**
  124. * Set the callback to be used to resolve users.
  125. *
  126. * @param \Closure $userResolver
  127. * @return \Illuminate\Auth\AuthManager
  128. * @staticsss
  129. */
  130. public static function resolveUsersUsing($userResolver)
  131. {
  132. /** @var \Illuminate\Auth\AuthManager $instance */
  133. return $instance->resolveUsersUsing($userResolver);
  134. }
  135. /**
  136. * Register a custom driver creator Closure.
  137. *
  138. * @param string $driver
  139. * @param \Closure $callback
  140. * @return \Illuminate\Auth\AuthManager
  141. * @staticsss
  142. */
  143. public static function extend($driver, $callback)
  144. {
  145. /** @var \Illuminate\Auth\AuthManager $instance */
  146. return $instance->extend($driver, $callback);
  147. }
  148. /**
  149. * Register a custom provider creator Closure.
  150. *
  151. * @param string $name
  152. * @param \Closure $callback
  153. * @return \Illuminate\Auth\AuthManager
  154. * @staticsss
  155. */
  156. public static function provider($name, $callback)
  157. {
  158. /** @var \Illuminate\Auth\AuthManager $instance */
  159. return $instance->provider($name, $callback);
  160. }
  161. /**
  162. * Determines if any guards have already been resolved.
  163. *
  164. * @return bool
  165. * @staticsss
  166. */
  167. public static function hasResolvedGuards()
  168. {
  169. /** @var \Illuminate\Auth\AuthManager $instance */
  170. return $instance->hasResolvedGuards();
  171. }
  172. /**
  173. * Create the user provider implementation for the driver.
  174. *
  175. * @param string|null $provider
  176. * @return \Illuminate\Contracts\Auth\UserProvider|null
  177. * @throws \InvalidArgumentException
  178. * @staticsss
  179. */
  180. public static function createUserProvider($provider = null)
  181. {
  182. /** @var \Illuminate\Auth\AuthManager $instance */
  183. return $instance->createUserProvider($provider);
  184. }
  185. /**
  186. * Get the default user provider name.
  187. *
  188. * @return string
  189. * @staticsss
  190. */
  191. public static function getDefaultUserProvider()
  192. {
  193. /** @var \Illuminate\Auth\AuthManager $instance */
  194. return $instance->getDefaultUserProvider();
  195. }
  196. /**
  197. * Get the currently authenticated user.
  198. *
  199. * @return \App\Models\User|null
  200. * @staticsss
  201. */
  202. public static function user()
  203. {
  204. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  205. return $instance->user();
  206. }
  207. /**
  208. * Get the currently authenticated user or throws an exception.
  209. *
  210. * @throws \Tymon\JWTAuth\Exceptions\UserNotDefinedException
  211. * @return \App\Models\User
  212. * @staticsss
  213. */
  214. public static function userOrFail()
  215. {
  216. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  217. return $instance->userOrFail();
  218. }
  219. /**
  220. * Validate a user's credentials.
  221. *
  222. * @param array $credentials
  223. * @return bool
  224. * @staticsss
  225. */
  226. public static function validate($credentials = [])
  227. {
  228. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  229. return $instance->validate($credentials);
  230. }
  231. /**
  232. * Attempt to authenticate the user using the given credentials and return the token.
  233. *
  234. * @param array $credentials
  235. * @param bool $login
  236. * @return bool|string
  237. * @staticsss
  238. */
  239. public static function attempt($credentials = [], $login = true)
  240. {
  241. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  242. return $instance->attempt($credentials, $login);
  243. }
  244. /**
  245. * Create a token for a user.
  246. *
  247. * @param \Tymon\JWTAuth\Contracts\JWTSubject $user
  248. * @return string
  249. * @staticsss
  250. */
  251. public static function login($user)
  252. {
  253. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  254. return $instance->login($user);
  255. }
  256. /**
  257. * Logout the user, thus invalidating the token.
  258. *
  259. * @param bool $forceForever
  260. * @return void
  261. * @staticsss
  262. */
  263. public static function logout($forceForever = false)
  264. {
  265. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  266. $instance->logout($forceForever);
  267. }
  268. /**
  269. * Refresh the token.
  270. *
  271. * @param bool $forceForever
  272. * @param bool $resetClaims
  273. * @return string
  274. * @staticsss
  275. */
  276. public static function refresh($forceForever = false, $resetClaims = false)
  277. {
  278. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  279. return $instance->refresh($forceForever, $resetClaims);
  280. }
  281. /**
  282. * Invalidate the token.
  283. *
  284. * @param bool $forceForever
  285. * @return \Tymon\JWTAuth\JWT
  286. * @staticsss
  287. */
  288. public static function invalidate($forceForever = false)
  289. {
  290. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  291. return $instance->invalidate($forceForever);
  292. }
  293. /**
  294. * Create a new token by User id.
  295. *
  296. * @param mixed $id
  297. * @return string|null
  298. * @staticsss
  299. */
  300. public static function tokenById($id)
  301. {
  302. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  303. return $instance->tokenById($id);
  304. }
  305. /**
  306. * Log a user into the application using their credentials.
  307. *
  308. * @param array $credentials
  309. * @return bool
  310. * @staticsss
  311. */
  312. public static function once($credentials = [])
  313. {
  314. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  315. return $instance->once($credentials);
  316. }
  317. /**
  318. * Log the given User into the application.
  319. *
  320. * @param mixed $id
  321. * @return bool
  322. * @staticsss
  323. */
  324. public static function onceUsingId($id)
  325. {
  326. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  327. return $instance->onceUsingId($id);
  328. }
  329. /**
  330. * Alias for onceUsingId.
  331. *
  332. * @param mixed $id
  333. * @return bool
  334. * @staticsss
  335. */
  336. public static function byId($id)
  337. {
  338. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  339. return $instance->byId($id);
  340. }
  341. /**
  342. * Add any custom claims.
  343. *
  344. * @param array $claims
  345. * @return \Tymon\JWTAuth\JWTGuard
  346. * @staticsss
  347. */
  348. public static function claims($claims)
  349. {
  350. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  351. return $instance->claims($claims);
  352. }
  353. /**
  354. * Get the raw Payload instance.
  355. *
  356. * @return \Tymon\JWTAuth\Payload
  357. * @staticsss
  358. */
  359. public static function getPayload()
  360. {
  361. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  362. return $instance->getPayload();
  363. }
  364. /**
  365. * Alias for getPayload().
  366. *
  367. * @return \Tymon\JWTAuth\Payload
  368. * @staticsss
  369. */
  370. public static function payload()
  371. {
  372. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  373. return $instance->payload();
  374. }
  375. /**
  376. * Set the token.
  377. *
  378. * @param \Tymon\JWTAuth\Token|string $token
  379. * @return \Tymon\JWTAuth\JWTGuard
  380. * @staticsss
  381. */
  382. public static function setToken($token)
  383. {
  384. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  385. return $instance->setToken($token);
  386. }
  387. /**
  388. * Set the token ttl.
  389. *
  390. * @param int $ttl
  391. * @return \Tymon\JWTAuth\JWTGuard
  392. * @staticsss
  393. */
  394. public static function setTTL($ttl)
  395. {
  396. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  397. return $instance->setTTL($ttl);
  398. }
  399. /**
  400. * Get the user provider used by the guard.
  401. *
  402. * @return \Illuminate\Contracts\Auth\UserProvider
  403. * @staticsss
  404. */
  405. public static function getProvider()
  406. {
  407. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  408. return $instance->getProvider();
  409. }
  410. /**
  411. * Set the user provider used by the guard.
  412. *
  413. * @param \Illuminate\Contracts\Auth\UserProvider $provider
  414. * @return \Tymon\JWTAuth\JWTGuard
  415. * @staticsss
  416. */
  417. public static function setProvider($provider)
  418. {
  419. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  420. return $instance->setProvider($provider);
  421. }
  422. /**
  423. * Return the currently cached user.
  424. *
  425. * @return \App\Models\User|null
  426. * @staticsss
  427. */
  428. public static function getUser()
  429. {
  430. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  431. return $instance->getUser();
  432. }
  433. /**
  434. * Get the current request instance.
  435. *
  436. * @return \Illuminate\Http\Request
  437. * @staticsss
  438. */
  439. public static function getRequest()
  440. {
  441. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  442. return $instance->getRequest();
  443. }
  444. /**
  445. * Set the current request instance.
  446. *
  447. * @param \Illuminate\Http\Request $request
  448. * @return \Tymon\JWTAuth\JWTGuard
  449. * @staticsss
  450. */
  451. public static function setRequest($request)
  452. {
  453. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  454. return $instance->setRequest($request);
  455. }
  456. /**
  457. * Get the last user we attempted to authenticate.
  458. *
  459. * @return \App\Models\User
  460. * @staticsss
  461. */
  462. public static function getLastAttempted()
  463. {
  464. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  465. return $instance->getLastAttempted();
  466. }
  467. /**
  468. * Determine if current user is authenticated. If not, throw an exception.
  469. *
  470. * @return \App\Models\User
  471. * @throws \Illuminate\Auth\AuthenticationException
  472. * @staticsss
  473. */
  474. public static function authenticate()
  475. {
  476. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  477. return $instance->authenticate();
  478. }
  479. /**
  480. * Determine if the guard has a user instance.
  481. *
  482. * @return bool
  483. * @staticsss
  484. */
  485. public static function hasUser()
  486. {
  487. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  488. return $instance->hasUser();
  489. }
  490. /**
  491. * Determine if the current user is authenticated.
  492. *
  493. * @return bool
  494. * @staticsss
  495. */
  496. public static function check()
  497. {
  498. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  499. return $instance->check();
  500. }
  501. /**
  502. * Determine if the current user is a guest.
  503. *
  504. * @return bool
  505. * @staticsss
  506. */
  507. public static function guest()
  508. {
  509. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  510. return $instance->guest();
  511. }
  512. /**
  513. * Get the ID for the currently authenticated user.
  514. *
  515. * @return int|null
  516. * @staticsss
  517. */
  518. public static function id()
  519. {
  520. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  521. return $instance->id();
  522. }
  523. /**
  524. * Set the current user.
  525. *
  526. * @param \Illuminate\Contracts\Auth\Authenticatable $user
  527. * @return \Tymon\JWTAuth\JWTGuard
  528. * @staticsss
  529. */
  530. public static function setUser($user)
  531. {
  532. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  533. return $instance->setUser($user);
  534. }
  535. /**
  536. * Register a custom macro.
  537. *
  538. * @param string $name
  539. * @param object|callable $macro
  540. * @return void
  541. * @staticsss
  542. */
  543. public static function macro($name, $macro)
  544. {
  545. \Tymon\JWTAuth\JWTGuard::macro($name, $macro);
  546. }
  547. /**
  548. * Mix another object into the class.
  549. *
  550. * @param object $mixin
  551. * @param bool $replace
  552. * @return void
  553. * @throws \ReflectionException
  554. * @staticsss
  555. */
  556. public static function mixin($mixin, $replace = true)
  557. {
  558. \Tymon\JWTAuth\JWTGuard::mixin($mixin, $replace);
  559. }
  560. /**
  561. * Checks if macro is registered.
  562. *
  563. * @param string $name
  564. * @return bool
  565. * @staticsss
  566. */
  567. public static function hasMacro($name)
  568. {
  569. return \Tymon\JWTAuth\JWTGuard::hasMacro($name);
  570. }
  571. /**
  572. * Dynamically handle calls to the class.
  573. *
  574. * @param string $method
  575. * @param array $parameters
  576. * @return mixed
  577. * @throws \BadMethodCallException
  578. * @staticsss
  579. */
  580. public static function macroCall($method, $parameters)
  581. {
  582. /** @var \Tymon\JWTAuth\JWTGuard $instance */
  583. return $instance->macroCall($method, $parameters);
  584. }
  585. }
  586. /**
  587. *
  588. *
  589. * @see \Illuminate\Database\DatabaseManager
  590. * @see \Illuminate\Database\Connection
  591. */
  592. class DB {
  593. /**
  594. * Get a database connection instance.
  595. *
  596. * @param string|null $name
  597. * @return \Illuminate\Database\Connection
  598. * @staticsss
  599. */
  600. public static function connection($name = null)
  601. {
  602. /** @var \Illuminate\Database\DatabaseManager $instance */
  603. return $instance->connection($name);
  604. }
  605. /**
  606. * Disconnect from the given database and remove from local cache.
  607. *
  608. * @param string|null $name
  609. * @return void
  610. * @staticsss
  611. */
  612. public static function purge($name = null)
  613. {
  614. /** @var \Illuminate\Database\DatabaseManager $instance */
  615. $instance->purge($name);
  616. }
  617. /**
  618. * Disconnect from the given database.
  619. *
  620. * @param string|null $name
  621. * @return void
  622. * @staticsss
  623. */
  624. public static function disconnect($name = null)
  625. {
  626. /** @var \Illuminate\Database\DatabaseManager $instance */
  627. $instance->disconnect($name);
  628. }
  629. /**
  630. * Reconnect to the given database.
  631. *
  632. * @param string|null $name
  633. * @return \Illuminate\Database\Connection
  634. * @staticsss
  635. */
  636. public static function reconnect($name = null)
  637. {
  638. /** @var \Illuminate\Database\DatabaseManager $instance */
  639. return $instance->reconnect($name);
  640. }
  641. /**
  642. * Get the default connection name.
  643. *
  644. * @return string
  645. * @staticsss
  646. */
  647. public static function getDefaultConnection()
  648. {
  649. /** @var \Illuminate\Database\DatabaseManager $instance */
  650. return $instance->getDefaultConnection();
  651. }
  652. /**
  653. * Set the default connection name.
  654. *
  655. * @param string $name
  656. * @return void
  657. * @staticsss
  658. */
  659. public static function setDefaultConnection($name)
  660. {
  661. /** @var \Illuminate\Database\DatabaseManager $instance */
  662. $instance->setDefaultConnection($name);
  663. }
  664. /**
  665. * Get all of the support drivers.
  666. *
  667. * @return array
  668. * @staticsss
  669. */
  670. public static function supportedDrivers()
  671. {
  672. /** @var \Illuminate\Database\DatabaseManager $instance */
  673. return $instance->supportedDrivers();
  674. }
  675. /**
  676. * Get all of the drivers that are actually available.
  677. *
  678. * @return array
  679. * @staticsss
  680. */
  681. public static function availableDrivers()
  682. {
  683. /** @var \Illuminate\Database\DatabaseManager $instance */
  684. return $instance->availableDrivers();
  685. }
  686. /**
  687. * Register an extension connection resolver.
  688. *
  689. * @param string $name
  690. * @param callable $resolver
  691. * @return void
  692. * @staticsss
  693. */
  694. public static function extend($name, $resolver)
  695. {
  696. /** @var \Illuminate\Database\DatabaseManager $instance */
  697. $instance->extend($name, $resolver);
  698. }
  699. /**
  700. * Return all of the created connections.
  701. *
  702. * @return array
  703. * @staticsss
  704. */
  705. public static function getConnections()
  706. {
  707. /** @var \Illuminate\Database\DatabaseManager $instance */
  708. return $instance->getConnections();
  709. }
  710. /**
  711. * Set the database reconnector callback.
  712. *
  713. * @param callable $reconnector
  714. * @return void
  715. * @staticsss
  716. */
  717. public static function setReconnector($reconnector)
  718. {
  719. /** @var \Illuminate\Database\DatabaseManager $instance */
  720. $instance->setReconnector($reconnector);
  721. }
  722. /**
  723. * Get a schema builder instance for the connection.
  724. *
  725. * @return \Illuminate\Database\Schema\MySqlBuilder
  726. * @staticsss
  727. */
  728. public static function getSchemaBuilder()
  729. {
  730. /** @var \Illuminate\Database\MySqlConnection $instance */
  731. return $instance->getSchemaBuilder();
  732. }
  733. /**
  734. * Bind values to their parameters in the given statement.
  735. *
  736. * @param \PDOStatement $statement
  737. * @param array $bindings
  738. * @return void
  739. * @staticsss
  740. */
  741. public static function bindValues($statement, $bindings)
  742. {
  743. /** @var \Illuminate\Database\MySqlConnection $instance */
  744. $instance->bindValues($statement, $bindings);
  745. }
  746. /**
  747. * Set the query grammar to the default implementation.
  748. *
  749. * @return void
  750. * @staticsss
  751. */
  752. public static function useDefaultQueryGrammar()
  753. {
  754. //Method inherited from \Illuminate\Database\Connection
  755. /** @var \Illuminate\Database\MySqlConnection $instance */
  756. $instance->useDefaultQueryGrammar();
  757. }
  758. /**
  759. * Set the schema grammar to the default implementation.
  760. *
  761. * @return void
  762. * @staticsss
  763. */
  764. public static function useDefaultSchemaGrammar()
  765. {
  766. //Method inherited from \Illuminate\Database\Connection
  767. /** @var \Illuminate\Database\MySqlConnection $instance */
  768. $instance->useDefaultSchemaGrammar();
  769. }
  770. /**
  771. * Set the query post processor to the default implementation.
  772. *
  773. * @return void
  774. * @staticsss
  775. */
  776. public static function useDefaultPostProcessor()
  777. {
  778. //Method inherited from \Illuminate\Database\Connection
  779. /** @var \Illuminate\Database\MySqlConnection $instance */
  780. $instance->useDefaultPostProcessor();
  781. }
  782. /**
  783. * Begin a fluent query against a database table.
  784. *
  785. * @param \Closure|\Illuminate\Database\Query\Builder|string $table
  786. * @param string|null $as
  787. * @return \Illuminate\Database\Query\Builder
  788. * @staticsss
  789. */
  790. public static function table($table, $as = null)
  791. {
  792. //Method inherited from \Illuminate\Database\Connection
  793. /** @var \Illuminate\Database\MySqlConnection $instance */
  794. return $instance->table($table, $as);
  795. }
  796. /**
  797. * Get a new query builder instance.
  798. *
  799. * @return \Illuminate\Database\Query\Builder
  800. * @staticsss
  801. */
  802. public static function query()
  803. {
  804. //Method inherited from \Illuminate\Database\Connection
  805. /** @var \Illuminate\Database\MySqlConnection $instance */
  806. return $instance->query();
  807. }
  808. /**
  809. * Run a select statement and return a single result.
  810. *
  811. * @param string $query
  812. * @param array $bindings
  813. * @param bool $useReadPdo
  814. * @return mixed
  815. * @staticsss
  816. */
  817. public static function selectOne($query, $bindings = [], $useReadPdo = true)
  818. {
  819. //Method inherited from \Illuminate\Database\Connection
  820. /** @var \Illuminate\Database\MySqlConnection $instance */
  821. return $instance->selectOne($query, $bindings, $useReadPdo);
  822. }
  823. /**
  824. * Run a select statement against the database.
  825. *
  826. * @param string $query
  827. * @param array $bindings
  828. * @return array
  829. * @staticsss
  830. */
  831. public static function selectFromWriteConnection($query, $bindings = [])
  832. {
  833. //Method inherited from \Illuminate\Database\Connection
  834. /** @var \Illuminate\Database\MySqlConnection $instance */
  835. return $instance->selectFromWriteConnection($query, $bindings);
  836. }
  837. /**
  838. * Run a select statement against the database.
  839. *
  840. * @param string $query
  841. * @param array $bindings
  842. * @param bool $useReadPdo
  843. * @return array
  844. * @staticsss
  845. */
  846. public static function select($query, $bindings = [], $useReadPdo = true)
  847. {
  848. //Method inherited from \Illuminate\Database\Connection
  849. /** @var \Illuminate\Database\MySqlConnection $instance */
  850. return $instance->select($query, $bindings, $useReadPdo);
  851. }
  852. /**
  853. * Run a select statement against the database and returns a generator.
  854. *
  855. * @param string $query
  856. * @param array $bindings
  857. * @param bool $useReadPdo
  858. * @return \Generator
  859. * @staticsss
  860. */
  861. public static function cursor($query, $bindings = [], $useReadPdo = true)
  862. {
  863. //Method inherited from \Illuminate\Database\Connection
  864. /** @var \Illuminate\Database\MySqlConnection $instance */
  865. return $instance->cursor($query, $bindings, $useReadPdo);
  866. }
  867. /**
  868. * Run an insert statement against the database.
  869. *
  870. * @param string $query
  871. * @param array $bindings
  872. * @return bool
  873. * @staticsss
  874. */
  875. public static function insert($query, $bindings = [])
  876. {
  877. //Method inherited from \Illuminate\Database\Connection
  878. /** @var \Illuminate\Database\MySqlConnection $instance */
  879. return $instance->insert($query, $bindings);
  880. }
  881. /**
  882. * Run an update statement against the database.
  883. *
  884. * @param string $query
  885. * @param array $bindings
  886. * @return int
  887. * @staticsss
  888. */
  889. public static function update($query, $bindings = [])
  890. {
  891. //Method inherited from \Illuminate\Database\Connection
  892. /** @var \Illuminate\Database\MySqlConnection $instance */
  893. return $instance->update($query, $bindings);
  894. }
  895. /**
  896. * Run a delete statement against the database.
  897. *
  898. * @param string $query
  899. * @param array $bindings
  900. * @return int
  901. * @staticsss
  902. */
  903. public static function delete($query, $bindings = [])
  904. {
  905. //Method inherited from \Illuminate\Database\Connection
  906. /** @var \Illuminate\Database\MySqlConnection $instance */
  907. return $instance->delete($query, $bindings);
  908. }
  909. /**
  910. * Execute an SQL statement and return the boolean result.
  911. *
  912. * @param string $query
  913. * @param array $bindings
  914. * @return bool
  915. * @staticsss
  916. */
  917. public static function statement($query, $bindings = [])
  918. {
  919. //Method inherited from \Illuminate\Database\Connection
  920. /** @var \Illuminate\Database\MySqlConnection $instance */
  921. return $instance->statement($query, $bindings);
  922. }
  923. /**
  924. * Run an SQL statement and get the number of rows affected.
  925. *
  926. * @param string $query
  927. * @param array $bindings
  928. * @return int
  929. * @staticsss
  930. */
  931. public static function affectingStatement($query, $bindings = [])
  932. {
  933. //Method inherited from \Illuminate\Database\Connection
  934. /** @var \Illuminate\Database\MySqlConnection $instance */
  935. return $instance->affectingStatement($query, $bindings);
  936. }
  937. /**
  938. * Run a raw, unprepared query against the PDO connection.
  939. *
  940. * @param string $query
  941. * @return bool
  942. * @staticsss
  943. */
  944. public static function unprepared($query)
  945. {
  946. //Method inherited from \Illuminate\Database\Connection
  947. /** @var \Illuminate\Database\MySqlConnection $instance */
  948. return $instance->unprepared($query);
  949. }
  950. /**
  951. * Execute the given callback in "dry run" mode.
  952. *
  953. * @param \Closure $callback
  954. * @return array
  955. * @staticsss
  956. */
  957. public static function pretend($callback)
  958. {
  959. //Method inherited from \Illuminate\Database\Connection
  960. /** @var \Illuminate\Database\MySqlConnection $instance */
  961. return $instance->pretend($callback);
  962. }
  963. /**
  964. * Prepare the query bindings for execution.
  965. *
  966. * @param array $bindings
  967. * @return array
  968. * @staticsss
  969. */
  970. public static function prepareBindings($bindings)
  971. {
  972. //Method inherited from \Illuminate\Database\Connection
  973. /** @var \Illuminate\Database\MySqlConnection $instance */
  974. return $instance->prepareBindings($bindings);
  975. }
  976. /**
  977. * Log a query in the connection's query log.
  978. *
  979. * @param string $query
  980. * @param array $bindings
  981. * @param float|null $time
  982. * @return void
  983. * @staticsss
  984. */
  985. public static function logQuery($query, $bindings, $time = null)
  986. {
  987. //Method inherited from \Illuminate\Database\Connection
  988. /** @var \Illuminate\Database\MySqlConnection $instance */
  989. $instance->logQuery($query, $bindings, $time);
  990. }
  991. /**
  992. * Register a database query listener with the connection.
  993. *
  994. * @param \Closure $callback
  995. * @return void
  996. * @staticsss
  997. */
  998. public static function listen($callback)
  999. {
  1000. //Method inherited from \Illuminate\Database\Connection
  1001. /** @var \Illuminate\Database\MySqlConnection $instance */
  1002. $instance->listen($callback);
  1003. }
  1004. /**
  1005. * Get a new raw query expression.
  1006. *
  1007. * @param mixed $value
  1008. * @return \Illuminate\Database\Query\Expression
  1009. * @staticsss
  1010. */
  1011. public static function raw($value)
  1012. {
  1013. //Method inherited from \Illuminate\Database\Connection
  1014. /** @var \Illuminate\Database\MySqlConnection $instance */
  1015. return $instance->raw($value);
  1016. }
  1017. /**
  1018. * Indicate if any records have been modified.
  1019. *
  1020. * @param bool $value
  1021. * @return void
  1022. * @staticsss
  1023. */
  1024. public static function recordsHaveBeenModified($value = true)
  1025. {
  1026. //Method inherited from \Illuminate\Database\Connection
  1027. /** @var \Illuminate\Database\MySqlConnection $instance */
  1028. $instance->recordsHaveBeenModified($value);
  1029. }
  1030. /**
  1031. * Is Doctrine available?
  1032. *
  1033. * @return bool
  1034. * @staticsss
  1035. */
  1036. public static function isDoctrineAvailable()
  1037. {
  1038. //Method inherited from \Illuminate\Database\Connection
  1039. /** @var \Illuminate\Database\MySqlConnection $instance */
  1040. return $instance->isDoctrineAvailable();
  1041. }
  1042. /**
  1043. * Get a Doctrine Schema Column instance.
  1044. *
  1045. * @param string $table
  1046. * @param string $column
  1047. * @return \Doctrine\DBAL\Schema\Column
  1048. * @staticsss
  1049. */
  1050. public static function getDoctrineColumn($table, $column)
  1051. {
  1052. //Method inherited from \Illuminate\Database\Connection
  1053. /** @var \Illuminate\Database\MySqlConnection $instance */
  1054. return $instance->getDoctrineColumn($table, $column);
  1055. }
  1056. /**
  1057. * Get the Doctrine DBAL schema manager for the connection.
  1058. *
  1059. * @return \Doctrine\DBAL\Schema\AbstractSchemaManager
  1060. * @staticsss
  1061. */
  1062. public static function getDoctrineSchemaManager()
  1063. {
  1064. //Method inherited from \Illuminate\Database\Connection
  1065. /** @var \Illuminate\Database\MySqlConnection $instance */
  1066. return $instance->getDoctrineSchemaManager();
  1067. }
  1068. /**
  1069. * Get the Doctrine DBAL database connection instance.
  1070. *
  1071. * @return \Doctrine\DBAL\Connection
  1072. * @staticsss
  1073. */
  1074. public static function getDoctrineConnection()
  1075. {
  1076. //Method inherited from \Illuminate\Database\Connection
  1077. /** @var \Illuminate\Database\MySqlConnection $instance */
  1078. return $instance->getDoctrineConnection();
  1079. }
  1080. /**
  1081. * Get the current PDO connection.
  1082. *
  1083. * @return \PDO
  1084. * @staticsss
  1085. */
  1086. public static function getPdo()
  1087. {
  1088. //Method inherited from \Illuminate\Database\Connection
  1089. /** @var \Illuminate\Database\MySqlConnection $instance */
  1090. return $instance->getPdo();
  1091. }
  1092. /**
  1093. * Get the current PDO connection used for reading.
  1094. *
  1095. * @return \PDO
  1096. * @staticsss
  1097. */
  1098. public static function getReadPdo()
  1099. {
  1100. //Method inherited from \Illuminate\Database\Connection
  1101. /** @var \Illuminate\Database\MySqlConnection $instance */
  1102. return $instance->getReadPdo();
  1103. }
  1104. /**
  1105. * Set the PDO connection.
  1106. *
  1107. * @param \PDO|\Closure|null $pdo
  1108. * @return \Illuminate\Database\MySqlConnection
  1109. * @staticsss
  1110. */
  1111. public static function setPdo($pdo)
  1112. {
  1113. //Method inherited from \Illuminate\Database\Connection
  1114. /** @var \Illuminate\Database\MySqlConnection $instance */
  1115. return $instance->setPdo($pdo);
  1116. }
  1117. /**
  1118. * Set the PDO connection used for reading.
  1119. *
  1120. * @param \PDO|\Closure|null $pdo
  1121. * @return \Illuminate\Database\MySqlConnection
  1122. * @staticsss
  1123. */
  1124. public static function setReadPdo($pdo)
  1125. {
  1126. //Method inherited from \Illuminate\Database\Connection
  1127. /** @var \Illuminate\Database\MySqlConnection $instance */
  1128. return $instance->setReadPdo($pdo);
  1129. }
  1130. /**
  1131. * Get the database connection name.
  1132. *
  1133. * @return string|null
  1134. * @staticsss
  1135. */
  1136. public static function getName()
  1137. {
  1138. //Method inherited from \Illuminate\Database\Connection
  1139. /** @var \Illuminate\Database\MySqlConnection $instance */
  1140. return $instance->getName();
  1141. }
  1142. /**
  1143. * Get an option from the configuration options.
  1144. *
  1145. * @param string|null $option
  1146. * @return mixed
  1147. * @staticsss
  1148. */
  1149. public static function getConfig($option = null)
  1150. {
  1151. //Method inherited from \Illuminate\Database\Connection
  1152. /** @var \Illuminate\Database\MySqlConnection $instance */
  1153. return $instance->getConfig($option);
  1154. }
  1155. /**
  1156. * Get the PDO driver name.
  1157. *
  1158. * @return string
  1159. * @staticsss
  1160. */
  1161. public static function getDriverName()
  1162. {
  1163. //Method inherited from \Illuminate\Database\Connection
  1164. /** @var \Illuminate\Database\MySqlConnection $instance */
  1165. return $instance->getDriverName();
  1166. }
  1167. /**
  1168. * Get the query grammar used by the connection.
  1169. *
  1170. * @return \Illuminate\Database\Query\Grammars\Grammar
  1171. * @staticsss
  1172. */
  1173. public static function getQueryGrammar()
  1174. {
  1175. //Method inherited from \Illuminate\Database\Connection
  1176. /** @var \Illuminate\Database\MySqlConnection $instance */
  1177. return $instance->getQueryGrammar();
  1178. }
  1179. /**
  1180. * Set the query grammar used by the connection.
  1181. *
  1182. * @param \Illuminate\Database\Query\Grammars\Grammar $grammar
  1183. * @return \Illuminate\Database\MySqlConnection
  1184. * @staticsss
  1185. */
  1186. public static function setQueryGrammar($grammar)
  1187. {
  1188. //Method inherited from \Illuminate\Database\Connection
  1189. /** @var \Illuminate\Database\MySqlConnection $instance */
  1190. return $instance->setQueryGrammar($grammar);
  1191. }
  1192. /**
  1193. * Get the schema grammar used by the connection.
  1194. *
  1195. * @return \Illuminate\Database\Schema\Grammars\Grammar
  1196. * @staticsss
  1197. */
  1198. public static function getSchemaGrammar()
  1199. {
  1200. //Method inherited from \Illuminate\Database\Connection
  1201. /** @var \Illuminate\Database\MySqlConnection $instance */
  1202. return $instance->getSchemaGrammar();
  1203. }
  1204. /**
  1205. * Set the schema grammar used by the connection.
  1206. *
  1207. * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
  1208. * @return \Illuminate\Database\MySqlConnection
  1209. * @staticsss
  1210. */
  1211. public static function setSchemaGrammar($grammar)
  1212. {
  1213. //Method inherited from \Illuminate\Database\Connection
  1214. /** @var \Illuminate\Database\MySqlConnection $instance */
  1215. return $instance->setSchemaGrammar($grammar);
  1216. }
  1217. /**
  1218. * Get the query post processor used by the connection.
  1219. *
  1220. * @return \Illuminate\Database\Query\Processors\Processor
  1221. * @staticsss
  1222. */
  1223. public static function getPostProcessor()
  1224. {
  1225. //Method inherited from \Illuminate\Database\Connection
  1226. /** @var \Illuminate\Database\MySqlConnection $instance */
  1227. return $instance->getPostProcessor();
  1228. }
  1229. /**
  1230. * Set the query post processor used by the connection.
  1231. *
  1232. * @param \Illuminate\Database\Query\Processors\Processor $processor
  1233. * @return \Illuminate\Database\MySqlConnection
  1234. * @staticsss
  1235. */
  1236. public static function setPostProcessor($processor)
  1237. {
  1238. //Method inherited from \Illuminate\Database\Connection
  1239. /** @var \Illuminate\Database\MySqlConnection $instance */
  1240. return $instance->setPostProcessor($processor);
  1241. }
  1242. /**
  1243. * Get the event dispatcher used by the connection.
  1244. *
  1245. * @return \Illuminate\Contracts\Events\Dispatcher
  1246. * @staticsss
  1247. */
  1248. public static function getEventDispatcher()
  1249. {
  1250. //Method inherited from \Illuminate\Database\Connection
  1251. /** @var \Illuminate\Database\MySqlConnection $instance */
  1252. return $instance->getEventDispatcher();
  1253. }
  1254. /**
  1255. * Set the event dispatcher instance on the connection.
  1256. *
  1257. * @param \Illuminate\Contracts\Events\Dispatcher $events
  1258. * @return \Illuminate\Database\MySqlConnection
  1259. * @staticsss
  1260. */
  1261. public static function setEventDispatcher($events)
  1262. {
  1263. //Method inherited from \Illuminate\Database\Connection
  1264. /** @var \Illuminate\Database\MySqlConnection $instance */
  1265. return $instance->setEventDispatcher($events);
  1266. }
  1267. /**
  1268. * Unset the event dispatcher for this connection.
  1269. *
  1270. * @return void
  1271. * @staticsss
  1272. */
  1273. public static function unsetEventDispatcher()
  1274. {
  1275. //Method inherited from \Illuminate\Database\Connection
  1276. /** @var \Illuminate\Database\MySqlConnection $instance */
  1277. $instance->unsetEventDispatcher();
  1278. }
  1279. /**
  1280. * Determine if the connection is in a "dry run".
  1281. *
  1282. * @return bool
  1283. * @staticsss
  1284. */
  1285. public static function pretending()
  1286. {
  1287. //Method inherited from \Illuminate\Database\Connection
  1288. /** @var \Illuminate\Database\MySqlConnection $instance */
  1289. return $instance->pretending();
  1290. }
  1291. /**
  1292. * Get the connection query log.
  1293. *
  1294. * @return array
  1295. * @staticsss
  1296. */
  1297. public static function getQueryLog()
  1298. {
  1299. //Method inherited from \Illuminate\Database\Connection
  1300. /** @var \Illuminate\Database\MySqlConnection $instance */
  1301. return $instance->getQueryLog();
  1302. }
  1303. /**
  1304. * Clear the query log.
  1305. *
  1306. * @return void
  1307. * @staticsss
  1308. */
  1309. public static function flushQueryLog()
  1310. {
  1311. //Method inherited from \Illuminate\Database\Connection
  1312. /** @var \Illuminate\Database\MySqlConnection $instance */
  1313. $instance->flushQueryLog();
  1314. }
  1315. /**
  1316. * Enable the query log on the connection.
  1317. *
  1318. * @return void
  1319. * @staticsss
  1320. */
  1321. public static function enableQueryLog()
  1322. {
  1323. //Method inherited from \Illuminate\Database\Connection
  1324. /** @var \Illuminate\Database\MySqlConnection $instance */
  1325. $instance->enableQueryLog();
  1326. }
  1327. /**
  1328. * Disable the query log on the connection.
  1329. *
  1330. * @return void
  1331. * @staticsss
  1332. */
  1333. public static function disableQueryLog()
  1334. {
  1335. //Method inherited from \Illuminate\Database\Connection
  1336. /** @var \Illuminate\Database\MySqlConnection $instance */
  1337. $instance->disableQueryLog();
  1338. }
  1339. /**
  1340. * Determine whether we're logging queries.
  1341. *
  1342. * @return bool
  1343. * @staticsss
  1344. */
  1345. public static function logging()
  1346. {
  1347. //Method inherited from \Illuminate\Database\Connection
  1348. /** @var \Illuminate\Database\MySqlConnection $instance */
  1349. return $instance->logging();
  1350. }
  1351. /**
  1352. * Get the name of the connected database.
  1353. *
  1354. * @return string
  1355. * @staticsss
  1356. */
  1357. public static function getDatabaseName()
  1358. {
  1359. //Method inherited from \Illuminate\Database\Connection
  1360. /** @var \Illuminate\Database\MySqlConnection $instance */
  1361. return $instance->getDatabaseName();
  1362. }
  1363. /**
  1364. * Set the name of the connected database.
  1365. *
  1366. * @param string $database
  1367. * @return \Illuminate\Database\MySqlConnection
  1368. * @staticsss
  1369. */
  1370. public static function setDatabaseName($database)
  1371. {
  1372. //Method inherited from \Illuminate\Database\Connection
  1373. /** @var \Illuminate\Database\MySqlConnection $instance */
  1374. return $instance->setDatabaseName($database);
  1375. }
  1376. /**
  1377. * Get the table prefix for the connection.
  1378. *
  1379. * @return string
  1380. * @staticsss
  1381. */
  1382. public static function getTablePrefix()
  1383. {
  1384. //Method inherited from \Illuminate\Database\Connection
  1385. /** @var \Illuminate\Database\MySqlConnection $instance */
  1386. return $instance->getTablePrefix();
  1387. }
  1388. /**
  1389. * Set the table prefix in use by the connection.
  1390. *
  1391. * @param string $prefix
  1392. * @return \Illuminate\Database\MySqlConnection
  1393. * @staticsss
  1394. */
  1395. public static function setTablePrefix($prefix)
  1396. {
  1397. //Method inherited from \Illuminate\Database\Connection
  1398. /** @var \Illuminate\Database\MySqlConnection $instance */
  1399. return $instance->setTablePrefix($prefix);
  1400. }
  1401. /**
  1402. * Set the table prefix and return the grammar.
  1403. *
  1404. * @param \Illuminate\Database\Grammar $grammar
  1405. * @return \Illuminate\Database\Grammar
  1406. * @staticsss
  1407. */
  1408. public static function withTablePrefix($grammar)
  1409. {
  1410. //Method inherited from \Illuminate\Database\Connection
  1411. /** @var \Illuminate\Database\MySqlConnection $instance */
  1412. return $instance->withTablePrefix($grammar);
  1413. }
  1414. /**
  1415. * Register a connection resolver.
  1416. *
  1417. * @param string $driver
  1418. * @param \Closure $callback
  1419. * @return void
  1420. * @staticsss
  1421. */
  1422. public static function resolverFor($driver, $callback)
  1423. {
  1424. //Method inherited from \Illuminate\Database\Connection
  1425. \Illuminate\Database\MySqlConnection::resolverFor($driver, $callback);
  1426. }
  1427. /**
  1428. * Get the connection resolver for the given driver.
  1429. *
  1430. * @param string $driver
  1431. * @return mixed
  1432. * @staticsss
  1433. */
  1434. public static function getResolver($driver)
  1435. {
  1436. //Method inherited from \Illuminate\Database\Connection
  1437. return \Illuminate\Database\MySqlConnection::getResolver($driver);
  1438. }
  1439. /**
  1440. * Execute a Closure within a transaction.
  1441. *
  1442. * @param \Closure $callback
  1443. * @param int $attempts
  1444. * @return mixed
  1445. * @throws \Exception|\Throwable
  1446. * @staticsss
  1447. */
  1448. public static function transaction($callback, $attempts = 1)
  1449. {
  1450. //Method inherited from \Illuminate\Database\Connection
  1451. /** @var \Illuminate\Database\MySqlConnection $instance */
  1452. return $instance->transaction($callback, $attempts);
  1453. }
  1454. /**
  1455. * Start a new database transaction.
  1456. *
  1457. * @return void
  1458. * @throws \Exception
  1459. * @staticsss
  1460. */
  1461. public static function beginTransaction()
  1462. {
  1463. //Method inherited from \Illuminate\Database\Connection
  1464. /** @var \Illuminate\Database\MySqlConnection $instance */
  1465. $instance->beginTransaction();
  1466. }
  1467. /**
  1468. * Commit the active database transaction.
  1469. *
  1470. * @return void
  1471. * @staticsss
  1472. */
  1473. public static function commit()
  1474. {
  1475. //Method inherited from \Illuminate\Database\Connection
  1476. /** @var \Illuminate\Database\MySqlConnection $instance */
  1477. $instance->commit();
  1478. }
  1479. /**
  1480. * Rollback the active database transaction.
  1481. *
  1482. * @param int|null $toLevel
  1483. * @return void
  1484. * @throws \Exception
  1485. * @staticsss
  1486. */
  1487. public static function rollBack($toLevel = null)
  1488. {
  1489. //Method inherited from \Illuminate\Database\Connection
  1490. /** @var \Illuminate\Database\MySqlConnection $instance */
  1491. $instance->rollBack($toLevel);
  1492. }
  1493. /**
  1494. * Get the number of active transactions.
  1495. *
  1496. * @return int
  1497. * @staticsss
  1498. */
  1499. public static function transactionLevel()
  1500. {
  1501. //Method inherited from \Illuminate\Database\Connection
  1502. /** @var \Illuminate\Database\MySqlConnection $instance */
  1503. return $instance->transactionLevel();
  1504. }
  1505. }
  1506. /**
  1507. *
  1508. *
  1509. * @see \Illuminate\Cache\CacheManager
  1510. * @see \Illuminate\Cache\Repository
  1511. */
  1512. class Cache {
  1513. /**
  1514. * Get a cache store instance by name, wrapped in a repository.
  1515. *
  1516. * @param string|null $name
  1517. * @return \Illuminate\Contracts\Cache\Repository
  1518. * @staticsss
  1519. */
  1520. public static function store($name = null)
  1521. {
  1522. /** @var \Illuminate\Cache\CacheManager $instance */
  1523. return $instance->store($name);
  1524. }
  1525. /**
  1526. * Get a cache driver instance.
  1527. *
  1528. * @param string|null $driver
  1529. * @return \Illuminate\Contracts\Cache\Repository
  1530. * @staticsss
  1531. */
  1532. public static function driver($driver = null)
  1533. {
  1534. /** @var \Illuminate\Cache\CacheManager $instance */
  1535. return $instance->driver($driver);
  1536. }
  1537. /**
  1538. * Create a new cache repository with the given implementation.
  1539. *
  1540. * @param \Illuminate\Contracts\Cache\Store $store
  1541. * @return \Illuminate\Cache\Repository
  1542. * @staticsss
  1543. */
  1544. public static function repository($store)
  1545. {
  1546. /** @var \Illuminate\Cache\CacheManager $instance */
  1547. return $instance->repository($store);
  1548. }
  1549. /**
  1550. * Get the default cache driver name.
  1551. *
  1552. * @return string
  1553. * @staticsss
  1554. */
  1555. public static function getDefaultDriver()
  1556. {
  1557. /** @var \Illuminate\Cache\CacheManager $instance */
  1558. return $instance->getDefaultDriver();
  1559. }
  1560. /**
  1561. * Set the default cache driver name.
  1562. *
  1563. * @param string $name
  1564. * @return void
  1565. * @staticsss
  1566. */
  1567. public static function setDefaultDriver($name)
  1568. {
  1569. /** @var \Illuminate\Cache\CacheManager $instance */
  1570. $instance->setDefaultDriver($name);
  1571. }
  1572. /**
  1573. * Unset the given driver instances.
  1574. *
  1575. * @param array|string|null $name
  1576. * @return \Illuminate\Cache\CacheManager
  1577. * @staticsss
  1578. */
  1579. public static function forgetDriver($name = null)
  1580. {
  1581. /** @var \Illuminate\Cache\CacheManager $instance */
  1582. return $instance->forgetDriver($name);
  1583. }
  1584. /**
  1585. * Register a custom driver creator Closure.
  1586. *
  1587. * @param string $driver
  1588. * @param \Closure $callback
  1589. * @return \Illuminate\Cache\CacheManager
  1590. * @staticsss
  1591. */
  1592. public static function extend($driver, $callback)
  1593. {
  1594. /** @var \Illuminate\Cache\CacheManager $instance */
  1595. return $instance->extend($driver, $callback);
  1596. }
  1597. /**
  1598. * Determine if an item exists in the cache.
  1599. *
  1600. * @param string $key
  1601. * @return bool
  1602. * @staticsss
  1603. */
  1604. public static function has($key)
  1605. {
  1606. /** @var \Illuminate\Cache\Repository $instance */
  1607. return $instance->has($key);
  1608. }
  1609. /**
  1610. * Determine if an item doesn't exist in the cache.
  1611. *
  1612. * @param string $key
  1613. * @return bool
  1614. * @staticsss
  1615. */
  1616. public static function missing($key)
  1617. {
  1618. /** @var \Illuminate\Cache\Repository $instance */
  1619. return $instance->missing($key);
  1620. }
  1621. /**
  1622. * Retrieve an item from the cache by key.
  1623. *
  1624. * @param string $key
  1625. * @param mixed $default
  1626. * @return mixed
  1627. * @staticsss
  1628. */
  1629. public static function get($key, $default = null)
  1630. {
  1631. /** @var \Illuminate\Cache\Repository $instance */
  1632. return $instance->get($key, $default);
  1633. }
  1634. /**
  1635. * Retrieve multiple items from the cache by key.
  1636. *
  1637. * Items not found in the cache will have a null value.
  1638. *
  1639. * @param array $keys
  1640. * @return array
  1641. * @staticsss
  1642. */
  1643. public static function many($keys)
  1644. {
  1645. /** @var \Illuminate\Cache\Repository $instance */
  1646. return $instance->many($keys);
  1647. }
  1648. /**
  1649. * Obtains multiple cache items by their unique keys.
  1650. *
  1651. * @param \Psr\SimpleCache\iterable $keys A list of keys that can obtained in a single operation.
  1652. * @param mixed $default Default value to return for keys that do not exist.
  1653. * @return \Psr\SimpleCache\iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
  1654. * @throws \Psr\SimpleCache\InvalidArgumentException
  1655. * MUST be thrown if $keys is neither an array nor a Traversable,
  1656. * or if any of the $keys are not a legal value.
  1657. * @staticsss
  1658. */
  1659. public static function getMultiple($keys, $default = null)
  1660. {
  1661. /** @var \Illuminate\Cache\Repository $instance */
  1662. return $instance->getMultiple($keys, $default);
  1663. }
  1664. /**
  1665. * Retrieve an item from the cache and delete it.
  1666. *
  1667. * @param string $key
  1668. * @param mixed $default
  1669. * @return mixed
  1670. * @staticsss
  1671. */
  1672. public static function pull($key, $default = null)
  1673. {
  1674. /** @var \Illuminate\Cache\Repository $instance */
  1675. return $instance->pull($key, $default);
  1676. }
  1677. /**
  1678. * Store an item in the cache.
  1679. *
  1680. * @param string $key
  1681. * @param mixed $value
  1682. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  1683. * @return bool
  1684. * @staticsss
  1685. */
  1686. public static function put($key, $value, $ttl = null)
  1687. {
  1688. /** @var \Illuminate\Cache\Repository $instance */
  1689. return $instance->put($key, $value, $ttl);
  1690. }
  1691. /**
  1692. * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
  1693. *
  1694. * @param string $key The key of the item to store.
  1695. * @param mixed $value The value of the item to store, must be serializable.
  1696. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  1697. * the driver supports TTL then the library may set a default value
  1698. * for it or let the driver take care of that.
  1699. * @return bool True on success and false on failure.
  1700. * @throws \Psr\SimpleCache\InvalidArgumentException
  1701. * MUST be thrown if the $key string is not a legal value.
  1702. * @staticsss
  1703. */
  1704. public static function set($key, $value, $ttl = null)
  1705. {
  1706. /** @var \Illuminate\Cache\Repository $instance */
  1707. return $instance->set($key, $value, $ttl);
  1708. }
  1709. /**
  1710. * Store multiple items in the cache for a given number of seconds.
  1711. *
  1712. * @param array $values
  1713. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  1714. * @return bool
  1715. * @staticsss
  1716. */
  1717. public static function putMany($values, $ttl = null)
  1718. {
  1719. /** @var \Illuminate\Cache\Repository $instance */
  1720. return $instance->putMany($values, $ttl);
  1721. }
  1722. /**
  1723. * Persists a set of key => value pairs in the cache, with an optional TTL.
  1724. *
  1725. * @param \Psr\SimpleCache\iterable $values A list of key => value pairs for a multiple-set operation.
  1726. * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
  1727. * the driver supports TTL then the library may set a default value
  1728. * for it or let the driver take care of that.
  1729. * @return bool True on success and false on failure.
  1730. * @throws \Psr\SimpleCache\InvalidArgumentException
  1731. * MUST be thrown if $values is neither an array nor a Traversable,
  1732. * or if any of the $values are not a legal value.
  1733. * @staticsss
  1734. */
  1735. public static function setMultiple($values, $ttl = null)
  1736. {
  1737. /** @var \Illuminate\Cache\Repository $instance */
  1738. return $instance->setMultiple($values, $ttl);
  1739. }
  1740. /**
  1741. * Store an item in the cache if the key does not exist.
  1742. *
  1743. * @param string $key
  1744. * @param mixed $value
  1745. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  1746. * @return bool
  1747. * @staticsss
  1748. */
  1749. public static function add($key, $value, $ttl = null)
  1750. {
  1751. /** @var \Illuminate\Cache\Repository $instance */
  1752. return $instance->add($key, $value, $ttl);
  1753. }
  1754. /**
  1755. * Increment the value of an item in the cache.
  1756. *
  1757. * @param string $key
  1758. * @param mixed $value
  1759. * @return int|bool
  1760. * @staticsss
  1761. */
  1762. public static function increment($key, $value = 1)
  1763. {
  1764. /** @var \Illuminate\Cache\Repository $instance */
  1765. return $instance->increment($key, $value);
  1766. }
  1767. /**
  1768. * Decrement the value of an item in the cache.
  1769. *
  1770. * @param string $key
  1771. * @param mixed $value
  1772. * @return int|bool
  1773. * @staticsss
  1774. */
  1775. public static function decrement($key, $value = 1)
  1776. {
  1777. /** @var \Illuminate\Cache\Repository $instance */
  1778. return $instance->decrement($key, $value);
  1779. }
  1780. /**
  1781. * Store an item in the cache indefinitely.
  1782. *
  1783. * @param string $key
  1784. * @param mixed $value
  1785. * @return bool
  1786. * @staticsss
  1787. */
  1788. public static function forever($key, $value)
  1789. {
  1790. /** @var \Illuminate\Cache\Repository $instance */
  1791. return $instance->forever($key, $value);
  1792. }
  1793. /**
  1794. * Get an item from the cache, or execute the given Closure and store the result.
  1795. *
  1796. * @param string $key
  1797. * @param \DateTimeInterface|\DateInterval|int|null $ttl
  1798. * @param \Closure $callback
  1799. * @return mixed
  1800. * @staticsss
  1801. */
  1802. public static function remember($key, $ttl, $callback)
  1803. {
  1804. /** @var \Illuminate\Cache\Repository $instance */
  1805. return $instance->remember($key, $ttl, $callback);
  1806. }
  1807. /**
  1808. * Get an item from the cache, or execute the given Closure and store the result forever.
  1809. *
  1810. * @param string $key
  1811. * @param \Closure $callback
  1812. * @return mixed
  1813. * @staticsss
  1814. */
  1815. public static function sear($key, $callback)
  1816. {
  1817. /** @var \Illuminate\Cache\Repository $instance */
  1818. return $instance->sear($key, $callback);
  1819. }
  1820. /**
  1821. * Get an item from the cache, or execute the given Closure and store the result forever.
  1822. *
  1823. * @param string $key
  1824. * @param \Closure $callback
  1825. * @return mixed
  1826. * @staticsss
  1827. */
  1828. public static function rememberForever($key, $callback)
  1829. {
  1830. /** @var \Illuminate\Cache\Repository $instance */
  1831. return $instance->rememberForever($key, $callback);
  1832. }
  1833. /**
  1834. * Remove an item from the cache.
  1835. *
  1836. * @param string $key
  1837. * @return bool
  1838. * @staticsss
  1839. */
  1840. public static function forget($key)
  1841. {
  1842. /** @var \Illuminate\Cache\Repository $instance */
  1843. return $instance->forget($key);
  1844. }
  1845. /**
  1846. * Delete an item from the cache by its unique key.
  1847. *
  1848. * @param string $key The unique cache key of the item to delete.
  1849. * @return bool True if the item was successfully removed. False if there was an error.
  1850. * @throws \Psr\SimpleCache\InvalidArgumentException
  1851. * MUST be thrown if the $key string is not a legal value.
  1852. * @staticsss
  1853. */
  1854. public static function delete($key)
  1855. {
  1856. /** @var \Illuminate\Cache\Repository $instance */
  1857. return $instance->delete($key);
  1858. }
  1859. /**
  1860. * Deletes multiple cache items in a single operation.
  1861. *
  1862. * @param \Psr\SimpleCache\iterable $keys A list of string-based keys to be deleted.
  1863. * @return bool True if the items were successfully removed. False if there was an error.
  1864. * @throws \Psr\SimpleCache\InvalidArgumentException
  1865. * MUST be thrown if $keys is neither an array nor a Traversable,
  1866. * or if any of the $keys are not a legal value.
  1867. * @staticsss
  1868. */
  1869. public static function deleteMultiple($keys)
  1870. {
  1871. /** @var \Illuminate\Cache\Repository $instance */
  1872. return $instance->deleteMultiple($keys);
  1873. }
  1874. /**
  1875. * Wipes clean the entire cache's keys.
  1876. *
  1877. * @return bool True on success and false on failure.
  1878. * @staticsss
  1879. */
  1880. public static function clear()
  1881. {
  1882. /** @var \Illuminate\Cache\Repository $instance */
  1883. return $instance->clear();
  1884. }
  1885. /**
  1886. * Begin executing a new tags operation if the store supports it.
  1887. *
  1888. * @param array|mixed $names
  1889. * @return \Illuminate\Cache\TaggedCache
  1890. * @throws \BadMethodCallException
  1891. * @staticsss
  1892. */
  1893. public static function tags($names)
  1894. {
  1895. /** @var \Illuminate\Cache\Repository $instance */
  1896. return $instance->tags($names);
  1897. }
  1898. /**
  1899. * Get the default cache time.
  1900. *
  1901. * @return int|null
  1902. * @staticsss
  1903. */
  1904. public static function getDefaultCacheTime()
  1905. {
  1906. /** @var \Illuminate\Cache\Repository $instance */
  1907. return $instance->getDefaultCacheTime();
  1908. }
  1909. /**
  1910. * Set the default cache time in seconds.
  1911. *
  1912. * @param int|null $seconds
  1913. * @return \Illuminate\Cache\Repository
  1914. * @staticsss
  1915. */
  1916. public static function setDefaultCacheTime($seconds)
  1917. {
  1918. /** @var \Illuminate\Cache\Repository $instance */
  1919. return $instance->setDefaultCacheTime($seconds);
  1920. }
  1921. /**
  1922. * Get the cache store implementation.
  1923. *
  1924. * @return \Illuminate\Contracts\Cache\Store
  1925. * @staticsss
  1926. */
  1927. public static function getStore()
  1928. {
  1929. /** @var \Illuminate\Cache\Repository $instance */
  1930. return $instance->getStore();
  1931. }
  1932. /**
  1933. * Set the event dispatcher instance.
  1934. *
  1935. * @param \Illuminate\Contracts\Events\Dispatcher $events
  1936. * @return void
  1937. * @staticsss
  1938. */
  1939. public static function setEventDispatcher($events)
  1940. {
  1941. /** @var \Illuminate\Cache\Repository $instance */
  1942. $instance->setEventDispatcher($events);
  1943. }
  1944. /**
  1945. * Determine if a cached value exists.
  1946. *
  1947. * @param string $key
  1948. * @return bool
  1949. * @staticsss
  1950. */
  1951. public static function offsetExists($key)
  1952. {
  1953. /** @var \Illuminate\Cache\Repository $instance */
  1954. return $instance->offsetExists($key);
  1955. }
  1956. /**
  1957. * Retrieve an item from the cache by key.
  1958. *
  1959. * @param string $key
  1960. * @return mixed
  1961. * @staticsss
  1962. */
  1963. public static function offsetGet($key)
  1964. {
  1965. /** @var \Illuminate\Cache\Repository $instance */
  1966. return $instance->offsetGet($key);
  1967. }
  1968. /**
  1969. * Store an item in the cache for the default time.
  1970. *
  1971. * @param string $key
  1972. * @param mixed $value
  1973. * @return void
  1974. * @staticsss
  1975. */
  1976. public static function offsetSet($key, $value)
  1977. {
  1978. /** @var \Illuminate\Cache\Repository $instance */
  1979. $instance->offsetSet($key, $value);
  1980. }
  1981. /**
  1982. * Remove an item from the cache.
  1983. *
  1984. * @param string $key
  1985. * @return void
  1986. * @staticsss
  1987. */
  1988. public static function offsetUnset($key)
  1989. {
  1990. /** @var \Illuminate\Cache\Repository $instance */
  1991. $instance->offsetUnset($key);
  1992. }
  1993. /**
  1994. * Register a custom macro.
  1995. *
  1996. * @param string $name
  1997. * @param object|callable $macro
  1998. * @return void
  1999. * @staticsss
  2000. */
  2001. public static function macro($name, $macro)
  2002. {
  2003. \Illuminate\Cache\Repository::macro($name, $macro);
  2004. }
  2005. /**
  2006. * Mix another object into the class.
  2007. *
  2008. * @param object $mixin
  2009. * @param bool $replace
  2010. * @return void
  2011. * @throws \ReflectionException
  2012. * @staticsss
  2013. */
  2014. public static function mixin($mixin, $replace = true)
  2015. {
  2016. \Illuminate\Cache\Repository::mixin($mixin, $replace);
  2017. }
  2018. /**
  2019. * Checks if macro is registered.
  2020. *
  2021. * @param string $name
  2022. * @return bool
  2023. * @staticsss
  2024. */
  2025. public static function hasMacro($name)
  2026. {
  2027. return \Illuminate\Cache\Repository::hasMacro($name);
  2028. }
  2029. /**
  2030. * Dynamically handle calls to the class.
  2031. *
  2032. * @param string $method
  2033. * @param array $parameters
  2034. * @return mixed
  2035. * @throws \BadMethodCallException
  2036. * @staticsss
  2037. */
  2038. public static function macroCall($method, $parameters)
  2039. {
  2040. /** @var \Illuminate\Cache\Repository $instance */
  2041. return $instance->macroCall($method, $parameters);
  2042. }
  2043. /**
  2044. * Remove all items from the cache.
  2045. *
  2046. * @return bool
  2047. * @staticsss
  2048. */
  2049. public static function flush()
  2050. {
  2051. /** @var \Illuminate\Cache\FileStore $instance */
  2052. return $instance->flush();
  2053. }
  2054. /**
  2055. * Get the Filesystem instance.
  2056. *
  2057. * @return \Illuminate\Filesystem\Filesystem
  2058. * @staticsss
  2059. */
  2060. public static function getFilesystem()
  2061. {
  2062. /** @var \Illuminate\Cache\FileStore $instance */
  2063. return $instance->getFilesystem();
  2064. }
  2065. /**
  2066. * Get the working directory of the cache.
  2067. *
  2068. * @return string
  2069. * @staticsss
  2070. */
  2071. public static function getDirectory()
  2072. {
  2073. /** @var \Illuminate\Cache\FileStore $instance */
  2074. return $instance->getDirectory();
  2075. }
  2076. /**
  2077. * Get the cache key prefix.
  2078. *
  2079. * @return string
  2080. * @staticsss
  2081. */
  2082. public static function getPrefix()
  2083. {
  2084. /** @var \Illuminate\Cache\FileStore $instance */
  2085. return $instance->getPrefix();
  2086. }
  2087. }
  2088. /**
  2089. *
  2090. *
  2091. * @see \Illuminate\Events\Dispatcher
  2092. */
  2093. class Event {
  2094. /**
  2095. * Register an event listener with the dispatcher.
  2096. *
  2097. * @param string|array $events
  2098. * @param mixed $listener
  2099. * @return void
  2100. * @staticsss
  2101. */
  2102. public static function listen($events, $listener)
  2103. {
  2104. /** @var \Illuminate\Events\Dispatcher $instance */
  2105. $instance->listen($events, $listener);
  2106. }
  2107. /**
  2108. * Determine if a given event has listeners.
  2109. *
  2110. * @param string $eventName
  2111. * @return bool
  2112. * @staticsss
  2113. */
  2114. public static function hasListeners($eventName)
  2115. {
  2116. /** @var \Illuminate\Events\Dispatcher $instance */
  2117. return $instance->hasListeners($eventName);
  2118. }
  2119. /**
  2120. * Register an event and payload to be fired later.
  2121. *
  2122. * @param string $event
  2123. * @param array $payload
  2124. * @return void
  2125. * @staticsss
  2126. */
  2127. public static function push($event, $payload = [])
  2128. {
  2129. /** @var \Illuminate\Events\Dispatcher $instance */
  2130. $instance->push($event, $payload);
  2131. }
  2132. /**
  2133. * Flush a set of pushed events.
  2134. *
  2135. * @param string $event
  2136. * @return void
  2137. * @staticsss
  2138. */
  2139. public static function flush($event)
  2140. {
  2141. /** @var \Illuminate\Events\Dispatcher $instance */
  2142. $instance->flush($event);
  2143. }
  2144. /**
  2145. * Register an event subscriber with the dispatcher.
  2146. *
  2147. * @param object|string $subscriber
  2148. * @return void
  2149. * @staticsss
  2150. */
  2151. public static function subscribe($subscriber)
  2152. {
  2153. /** @var \Illuminate\Events\Dispatcher $instance */
  2154. $instance->subscribe($subscriber);
  2155. }
  2156. /**
  2157. * Fire an event until the first non-null response is returned.
  2158. *
  2159. * @param string|object $event
  2160. * @param mixed $payload
  2161. * @return array|null
  2162. * @staticsss
  2163. */
  2164. public static function until($event, $payload = [])
  2165. {
  2166. /** @var \Illuminate\Events\Dispatcher $instance */
  2167. return $instance->until($event, $payload);
  2168. }
  2169. /**
  2170. * Fire an event and call the listeners.
  2171. *
  2172. * @param string|object $event
  2173. * @param mixed $payload
  2174. * @param bool $halt
  2175. * @return array|null
  2176. * @staticsss
  2177. */
  2178. public static function dispatch($event, $payload = [], $halt = false)
  2179. {
  2180. /** @var \Illuminate\Events\Dispatcher $instance */
  2181. return $instance->dispatch($event, $payload, $halt);
  2182. }
  2183. /**
  2184. * Get all of the listeners for a given event name.
  2185. *
  2186. * @param string $eventName
  2187. * @return array
  2188. * @staticsss
  2189. */
  2190. public static function getListeners($eventName)
  2191. {
  2192. /** @var \Illuminate\Events\Dispatcher $instance */
  2193. return $instance->getListeners($eventName);
  2194. }
  2195. /**
  2196. * Register an event listener with the dispatcher.
  2197. *
  2198. * @param \Closure|string $listener
  2199. * @param bool $wildcard
  2200. * @return \Closure
  2201. * @staticsss
  2202. */
  2203. public static function makeListener($listener, $wildcard = false)
  2204. {
  2205. /** @var \Illuminate\Events\Dispatcher $instance */
  2206. return $instance->makeListener($listener, $wildcard);
  2207. }
  2208. /**
  2209. * Create a class based listener using the IoC container.
  2210. *
  2211. * @param string $listener
  2212. * @param bool $wildcard
  2213. * @return \Closure
  2214. * @staticsss
  2215. */
  2216. public static function createClassListener($listener, $wildcard = false)
  2217. {
  2218. /** @var \Illuminate\Events\Dispatcher $instance */
  2219. return $instance->createClassListener($listener, $wildcard);
  2220. }
  2221. /**
  2222. * Remove a set of listeners from the dispatcher.
  2223. *
  2224. * @param string $event
  2225. * @return void
  2226. * @staticsss
  2227. */
  2228. public static function forget($event)
  2229. {
  2230. /** @var \Illuminate\Events\Dispatcher $instance */
  2231. $instance->forget($event);
  2232. }
  2233. /**
  2234. * Forget all of the pushed listeners.
  2235. *
  2236. * @return void
  2237. * @staticsss
  2238. */
  2239. public static function forgetPushed()
  2240. {
  2241. /** @var \Illuminate\Events\Dispatcher $instance */
  2242. $instance->forgetPushed();
  2243. }
  2244. /**
  2245. * Set the queue resolver implementation.
  2246. *
  2247. * @param callable $resolver
  2248. * @return \Illuminate\Events\Dispatcher
  2249. * @staticsss
  2250. */
  2251. public static function setQueueResolver($resolver)
  2252. {
  2253. /** @var \Illuminate\Events\Dispatcher $instance */
  2254. return $instance->setQueueResolver($resolver);
  2255. }
  2256. /**
  2257. * Assert if an event was dispatched based on a truth-test callback.
  2258. *
  2259. * @param string $event
  2260. * @param callable|int|null $callback
  2261. * @return void
  2262. * @staticsss
  2263. */
  2264. public static function assertDispatched($event, $callback = null)
  2265. {
  2266. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  2267. $instance->assertDispatched($event, $callback);
  2268. }
  2269. /**
  2270. * Assert if a event was dispatched a number of times.
  2271. *
  2272. * @param string $event
  2273. * @param int $times
  2274. * @return void
  2275. * @staticsss
  2276. */
  2277. public static function assertDispatchedTimes($event, $times = 1)
  2278. {
  2279. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  2280. $instance->assertDispatchedTimes($event, $times);
  2281. }
  2282. /**
  2283. * Determine if an event was dispatched based on a truth-test callback.
  2284. *
  2285. * @param string $event
  2286. * @param callable|null $callback
  2287. * @return void
  2288. * @staticsss
  2289. */
  2290. public static function assertNotDispatched($event, $callback = null)
  2291. {
  2292. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  2293. $instance->assertNotDispatched($event, $callback);
  2294. }
  2295. /**
  2296. * Get all of the events matching a truth-test callback.
  2297. *
  2298. * @param string $event
  2299. * @param callable|null $callback
  2300. * @return \Illuminate\Support\Collection
  2301. * @staticsss
  2302. */
  2303. public static function dispatched($event, $callback = null)
  2304. {
  2305. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  2306. return $instance->dispatched($event, $callback);
  2307. }
  2308. /**
  2309. * Determine if the given event has been dispatched.
  2310. *
  2311. * @param string $event
  2312. * @return bool
  2313. * @staticsss
  2314. */
  2315. public static function hasDispatched($event)
  2316. {
  2317. /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */
  2318. return $instance->hasDispatched($event);
  2319. }
  2320. }
  2321. /**
  2322. *
  2323. *
  2324. * @see \Illuminate\Log\Logger
  2325. */
  2326. class Log {
  2327. /**
  2328. * Create a new, on-demand aggregate logger instance.
  2329. *
  2330. * @param array $channels
  2331. * @param string|null $channel
  2332. * @return \Psr\Log\LoggerInterface
  2333. * @staticsss
  2334. */
  2335. public static function stack($channels, $channel = null)
  2336. {
  2337. /** @var \Illuminate\Log\LogManager $instance */
  2338. return $instance->stack($channels, $channel);
  2339. }
  2340. /**
  2341. * Get a log channel instance.
  2342. *
  2343. * @param string|null $channel
  2344. * @return mixed
  2345. * @staticsss
  2346. */
  2347. public static function channel($channel = null)
  2348. {
  2349. /** @var \Illuminate\Log\LogManager $instance */
  2350. return $instance->channel($channel);
  2351. }
  2352. /**
  2353. * Get a log driver instance.
  2354. *
  2355. * @param string|null $driver
  2356. * @return mixed
  2357. * @staticsss
  2358. */
  2359. public static function driver($driver = null)
  2360. {
  2361. /** @var \Illuminate\Log\LogManager $instance */
  2362. return $instance->driver($driver);
  2363. }
  2364. /**
  2365. *
  2366. *
  2367. * @return array
  2368. * @staticsss
  2369. */
  2370. public static function getChannels()
  2371. {
  2372. /** @var \Illuminate\Log\LogManager $instance */
  2373. return $instance->getChannels();
  2374. }
  2375. /**
  2376. * Get the default log driver name.
  2377. *
  2378. * @return string
  2379. * @staticsss
  2380. */
  2381. public static function getDefaultDriver()
  2382. {
  2383. /** @var \Illuminate\Log\LogManager $instance */
  2384. return $instance->getDefaultDriver();
  2385. }
  2386. /**
  2387. * Set the default log driver name.
  2388. *
  2389. * @param string $name
  2390. * @return void
  2391. * @staticsss
  2392. */
  2393. public static function setDefaultDriver($name)
  2394. {
  2395. /** @var \Illuminate\Log\LogManager $instance */
  2396. $instance->setDefaultDriver($name);
  2397. }
  2398. /**
  2399. * Register a custom driver creator Closure.
  2400. *
  2401. * @param string $driver
  2402. * @param \Closure $callback
  2403. * @return \Illuminate\Log\LogManager
  2404. * @staticsss
  2405. */
  2406. public static function extend($driver, $callback)
  2407. {
  2408. /** @var \Illuminate\Log\LogManager $instance */
  2409. return $instance->extend($driver, $callback);
  2410. }
  2411. /**
  2412. * Unset the given channel instance.
  2413. *
  2414. * @param string|null $name
  2415. * @return \Illuminate\Log\LogManager
  2416. * @staticsss
  2417. */
  2418. public static function forgetChannel($driver = null)
  2419. {
  2420. /** @var \Illuminate\Log\LogManager $instance */
  2421. return $instance->forgetChannel($driver);
  2422. }
  2423. /**
  2424. * System is unusable.
  2425. *
  2426. * @param string $message
  2427. * @param array $context
  2428. * @return void
  2429. * @staticsss
  2430. */
  2431. public static function emergency($message, $context = [])
  2432. {
  2433. /** @var \Illuminate\Log\LogManager $instance */
  2434. $instance->emergency($message, $context);
  2435. }
  2436. /**
  2437. * Action must be taken immediately.
  2438. *
  2439. * Example: Entire website down, database unavailable, etc. This should
  2440. * trigger the SMS alerts and wake you up.
  2441. *
  2442. * @param string $message
  2443. * @param array $context
  2444. * @return void
  2445. * @staticsss
  2446. */
  2447. public static function alert($message, $context = [])
  2448. {
  2449. /** @var \Illuminate\Log\LogManager $instance */
  2450. $instance->alert($message, $context);
  2451. }
  2452. /**
  2453. * Critical conditions.
  2454. *
  2455. * Example: Application component unavailable, unexpected exception.
  2456. *
  2457. * @param string $message
  2458. * @param array $context
  2459. * @return void
  2460. * @staticsss
  2461. */
  2462. public static function critical($message, $context = [])
  2463. {
  2464. /** @var \Illuminate\Log\LogManager $instance */
  2465. $instance->critical($message, $context);
  2466. }
  2467. /**
  2468. * Runtime errors that do not require immediate action but should typically
  2469. * be logged and monitored.
  2470. *
  2471. * @param string $message
  2472. * @param array $context
  2473. * @return void
  2474. * @staticsss
  2475. */
  2476. public static function error($message, $context = [])
  2477. {
  2478. /** @var \Illuminate\Log\LogManager $instance */
  2479. $instance->error($message, $context);
  2480. }
  2481. /**
  2482. * Exceptional occurrences that are not errors.
  2483. *
  2484. * Example: Use of deprecated APIs, poor use of an API, undesirable things
  2485. * that are not necessarily wrong.
  2486. *
  2487. * @param string $message
  2488. * @param array $context
  2489. * @return void
  2490. * @staticsss
  2491. */
  2492. public static function warning($message, $context = [])
  2493. {
  2494. /** @var \Illuminate\Log\LogManager $instance */
  2495. $instance->warning($message, $context);
  2496. }
  2497. /**
  2498. * Normal but significant events.
  2499. *
  2500. * @param string $message
  2501. * @param array $context
  2502. * @return void
  2503. * @staticsss
  2504. */
  2505. public static function notice($message, $context = [])
  2506. {
  2507. /** @var \Illuminate\Log\LogManager $instance */
  2508. $instance->notice($message, $context);
  2509. }
  2510. /**
  2511. * Interesting events.
  2512. *
  2513. * Example: User logs in, SQL logs.
  2514. *
  2515. * @param string $message
  2516. * @param array $context
  2517. * @return void
  2518. * @staticsss
  2519. */
  2520. public static function info($message, $context = [])
  2521. {
  2522. /** @var \Illuminate\Log\LogManager $instance */
  2523. $instance->info($message, $context);
  2524. }
  2525. /**
  2526. * Detailed debug information.
  2527. *
  2528. * @param string $message
  2529. * @param array $context
  2530. * @return void
  2531. * @staticsss
  2532. */
  2533. public static function debug($message, $context = [])
  2534. {
  2535. /** @var \Illuminate\Log\LogManager $instance */
  2536. $instance->debug($message, $context);
  2537. }
  2538. /**
  2539. * Logs with an arbitrary level.
  2540. *
  2541. * @param mixed $level
  2542. * @param string $message
  2543. * @param array $context
  2544. * @return void
  2545. * @staticsss
  2546. */
  2547. public static function log($level, $message, $context = [])
  2548. {
  2549. /** @var \Illuminate\Log\LogManager $instance */
  2550. $instance->log($level, $message, $context);
  2551. }
  2552. }
  2553. /**
  2554. *
  2555. *
  2556. * @see \Illuminate\Queue\QueueManager
  2557. * @see \Illuminate\Queue\Queue
  2558. */
  2559. class Queue {
  2560. /**
  2561. * Register an event listener for the before job event.
  2562. *
  2563. * @param mixed $callback
  2564. * @return void
  2565. * @staticsss
  2566. */
  2567. public static function before($callback)
  2568. {
  2569. /** @var \Illuminate\Queue\QueueManager $instance */
  2570. $instance->before($callback);
  2571. }
  2572. /**
  2573. * Register an event listener for the after job event.
  2574. *
  2575. * @param mixed $callback
  2576. * @return void
  2577. * @staticsss
  2578. */
  2579. public static function after($callback)
  2580. {
  2581. /** @var \Illuminate\Queue\QueueManager $instance */
  2582. $instance->after($callback);
  2583. }
  2584. /**
  2585. * Register an event listener for the exception occurred job event.
  2586. *
  2587. * @param mixed $callback
  2588. * @return void
  2589. * @staticsss
  2590. */
  2591. public static function exceptionOccurred($callback)
  2592. {
  2593. /** @var \Illuminate\Queue\QueueManager $instance */
  2594. $instance->exceptionOccurred($callback);
  2595. }
  2596. /**
  2597. * Register an event listener for the daemon queue loop.
  2598. *
  2599. * @param mixed $callback
  2600. * @return void
  2601. * @staticsss
  2602. */
  2603. public static function looping($callback)
  2604. {
  2605. /** @var \Illuminate\Queue\QueueManager $instance */
  2606. $instance->looping($callback);
  2607. }
  2608. /**
  2609. * Register an event listener for the failed job event.
  2610. *
  2611. * @param mixed $callback
  2612. * @return void
  2613. * @staticsss
  2614. */
  2615. public static function failing($callback)
  2616. {
  2617. /** @var \Illuminate\Queue\QueueManager $instance */
  2618. $instance->failing($callback);
  2619. }
  2620. /**
  2621. * Register an event listener for the daemon queue stopping.
  2622. *
  2623. * @param mixed $callback
  2624. * @return void
  2625. * @staticsss
  2626. */
  2627. public static function stopping($callback)
  2628. {
  2629. /** @var \Illuminate\Queue\QueueManager $instance */
  2630. $instance->stopping($callback);
  2631. }
  2632. /**
  2633. * Determine if the driver is connected.
  2634. *
  2635. * @param string|null $name
  2636. * @return bool
  2637. * @staticsss
  2638. */
  2639. public static function connected($name = null)
  2640. {
  2641. /** @var \Illuminate\Queue\QueueManager $instance */
  2642. return $instance->connected($name);
  2643. }
  2644. /**
  2645. * Resolve a queue connection instance.
  2646. *
  2647. * @param string|null $name
  2648. * @return \Illuminate\Contracts\Queue\Queue
  2649. * @staticsss
  2650. */
  2651. public static function connection($name = null)
  2652. {
  2653. /** @var \Illuminate\Queue\QueueManager $instance */
  2654. return $instance->connection($name);
  2655. }
  2656. /**
  2657. * Add a queue connection resolver.
  2658. *
  2659. * @param string $driver
  2660. * @param \Closure $resolver
  2661. * @return void
  2662. * @staticsss
  2663. */
  2664. public static function extend($driver, $resolver)
  2665. {
  2666. /** @var \Illuminate\Queue\QueueManager $instance */
  2667. $instance->extend($driver, $resolver);
  2668. }
  2669. /**
  2670. * Add a queue connection resolver.
  2671. *
  2672. * @param string $driver
  2673. * @param \Closure $resolver
  2674. * @return void
  2675. * @staticsss
  2676. */
  2677. public static function addConnector($driver, $resolver)
  2678. {
  2679. /** @var \Illuminate\Queue\QueueManager $instance */
  2680. $instance->addConnector($driver, $resolver);
  2681. }
  2682. /**
  2683. * Get the name of the default queue connection.
  2684. *
  2685. * @return string
  2686. * @staticsss
  2687. */
  2688. public static function getDefaultDriver()
  2689. {
  2690. /** @var \Illuminate\Queue\QueueManager $instance */
  2691. return $instance->getDefaultDriver();
  2692. }
  2693. /**
  2694. * Set the name of the default queue connection.
  2695. *
  2696. * @param string $name
  2697. * @return void
  2698. * @staticsss
  2699. */
  2700. public static function setDefaultDriver($name)
  2701. {
  2702. /** @var \Illuminate\Queue\QueueManager $instance */
  2703. $instance->setDefaultDriver($name);
  2704. }
  2705. /**
  2706. * Get the full name for the given connection.
  2707. *
  2708. * @param string|null $connection
  2709. * @return string
  2710. * @staticsss
  2711. */
  2712. public static function getName($connection = null)
  2713. {
  2714. /** @var \Illuminate\Queue\QueueManager $instance */
  2715. return $instance->getName($connection);
  2716. }
  2717. /**
  2718. * Assert if a job was pushed based on a truth-test callback.
  2719. *
  2720. * @param string $job
  2721. * @param callable|int|null $callback
  2722. * @return void
  2723. * @staticsss
  2724. */
  2725. public static function assertPushed($job, $callback = null)
  2726. {
  2727. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2728. $instance->assertPushed($job, $callback);
  2729. }
  2730. /**
  2731. * Assert if a job was pushed based on a truth-test callback.
  2732. *
  2733. * @param string $queue
  2734. * @param string $job
  2735. * @param callable|null $callback
  2736. * @return void
  2737. * @staticsss
  2738. */
  2739. public static function assertPushedOn($queue, $job, $callback = null)
  2740. {
  2741. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2742. $instance->assertPushedOn($queue, $job, $callback);
  2743. }
  2744. /**
  2745. * Assert if a job was pushed with chained jobs based on a truth-test callback.
  2746. *
  2747. * @param string $job
  2748. * @param array $expectedChain
  2749. * @param callable|null $callback
  2750. * @return void
  2751. * @staticsss
  2752. */
  2753. public static function assertPushedWithChain($job, $expectedChain = [], $callback = null)
  2754. {
  2755. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2756. $instance->assertPushedWithChain($job, $expectedChain, $callback);
  2757. }
  2758. /**
  2759. * Determine if a job was pushed based on a truth-test callback.
  2760. *
  2761. * @param string $job
  2762. * @param callable|null $callback
  2763. * @return void
  2764. * @staticsss
  2765. */
  2766. public static function assertNotPushed($job, $callback = null)
  2767. {
  2768. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2769. $instance->assertNotPushed($job, $callback);
  2770. }
  2771. /**
  2772. * Assert that no jobs were pushed.
  2773. *
  2774. * @return void
  2775. * @staticsss
  2776. */
  2777. public static function assertNothingPushed()
  2778. {
  2779. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2780. $instance->assertNothingPushed();
  2781. }
  2782. /**
  2783. * Get all of the jobs matching a truth-test callback.
  2784. *
  2785. * @param string $job
  2786. * @param callable|null $callback
  2787. * @return \Illuminate\Support\Collection
  2788. * @staticsss
  2789. */
  2790. public static function pushed($job, $callback = null)
  2791. {
  2792. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2793. return $instance->pushed($job, $callback);
  2794. }
  2795. /**
  2796. * Determine if there are any stored jobs for a given class.
  2797. *
  2798. * @param string $job
  2799. * @return bool
  2800. * @staticsss
  2801. */
  2802. public static function hasPushed($job)
  2803. {
  2804. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2805. return $instance->hasPushed($job);
  2806. }
  2807. /**
  2808. * Get the size of the queue.
  2809. *
  2810. * @param string|null $queue
  2811. * @return int
  2812. * @staticsss
  2813. */
  2814. public static function size($queue = null)
  2815. {
  2816. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2817. return $instance->size($queue);
  2818. }
  2819. /**
  2820. * Push a new job onto the queue.
  2821. *
  2822. * @param string $job
  2823. * @param mixed $data
  2824. * @param string|null $queue
  2825. * @return mixed
  2826. * @staticsss
  2827. */
  2828. public static function push($job, $data = '', $queue = null)
  2829. {
  2830. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2831. return $instance->push($job, $data, $queue);
  2832. }
  2833. /**
  2834. * Push a raw payload onto the queue.
  2835. *
  2836. * @param string $payload
  2837. * @param string|null $queue
  2838. * @param array $options
  2839. * @return mixed
  2840. * @staticsss
  2841. */
  2842. public static function pushRaw($payload, $queue = null, $options = [])
  2843. {
  2844. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2845. return $instance->pushRaw($payload, $queue, $options);
  2846. }
  2847. /**
  2848. * Push a new job onto the queue after a delay.
  2849. *
  2850. * @param \DateTimeInterface|\DateInterval|int $delay
  2851. * @param string $job
  2852. * @param mixed $data
  2853. * @param string|null $queue
  2854. * @return mixed
  2855. * @staticsss
  2856. */
  2857. public static function later($delay, $job, $data = '', $queue = null)
  2858. {
  2859. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2860. return $instance->later($delay, $job, $data, $queue);
  2861. }
  2862. /**
  2863. * Push a new job onto the queue.
  2864. *
  2865. * @param string $queue
  2866. * @param string $job
  2867. * @param mixed $data
  2868. * @return mixed
  2869. * @staticsss
  2870. */
  2871. public static function pushOn($queue, $job, $data = '')
  2872. {
  2873. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2874. return $instance->pushOn($queue, $job, $data);
  2875. }
  2876. /**
  2877. * Push a new job onto the queue after a delay.
  2878. *
  2879. * @param string $queue
  2880. * @param \DateTimeInterface|\DateInterval|int $delay
  2881. * @param string $job
  2882. * @param mixed $data
  2883. * @return mixed
  2884. * @staticsss
  2885. */
  2886. public static function laterOn($queue, $delay, $job, $data = '')
  2887. {
  2888. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2889. return $instance->laterOn($queue, $delay, $job, $data);
  2890. }
  2891. /**
  2892. * Pop the next job off of the queue.
  2893. *
  2894. * @param string|null $queue
  2895. * @return \Illuminate\Contracts\Queue\Job|null
  2896. * @staticsss
  2897. */
  2898. public static function pop($queue = null)
  2899. {
  2900. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2901. return $instance->pop($queue);
  2902. }
  2903. /**
  2904. * Push an array of jobs onto the queue.
  2905. *
  2906. * @param array $jobs
  2907. * @param mixed $data
  2908. * @param string|null $queue
  2909. * @return mixed
  2910. * @staticsss
  2911. */
  2912. public static function bulk($jobs, $data = '', $queue = null)
  2913. {
  2914. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2915. return $instance->bulk($jobs, $data, $queue);
  2916. }
  2917. /**
  2918. * Get the jobs that have been pushed.
  2919. *
  2920. * @return array
  2921. * @staticsss
  2922. */
  2923. public static function pushedJobs()
  2924. {
  2925. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2926. return $instance->pushedJobs();
  2927. }
  2928. /**
  2929. * Get the connection name for the queue.
  2930. *
  2931. * @return string
  2932. * @staticsss
  2933. */
  2934. public static function getConnectionName()
  2935. {
  2936. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2937. return $instance->getConnectionName();
  2938. }
  2939. /**
  2940. * Set the connection name for the queue.
  2941. *
  2942. * @param string $name
  2943. * @return \Illuminate\Support\Testing\Fakes\QueueFake
  2944. * @staticsss
  2945. */
  2946. public static function setConnectionName($name)
  2947. {
  2948. /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */
  2949. return $instance->setConnectionName($name);
  2950. }
  2951. /**
  2952. * Get the retry delay for an object-based queue handler.
  2953. *
  2954. * @param mixed $job
  2955. * @return mixed
  2956. * @staticsss
  2957. */
  2958. public static function getJobRetryDelay($job)
  2959. {
  2960. //Method inherited from \Illuminate\Queue\Queue
  2961. /** @var \Illuminate\Queue\SyncQueue $instance */
  2962. return $instance->getJobRetryDelay($job);
  2963. }
  2964. /**
  2965. * Get the expiration timestamp for an object-based queue handler.
  2966. *
  2967. * @param mixed $job
  2968. * @return mixed
  2969. * @staticsss
  2970. */
  2971. public static function getJobExpiration($job)
  2972. {
  2973. //Method inherited from \Illuminate\Queue\Queue
  2974. /** @var \Illuminate\Queue\SyncQueue $instance */
  2975. return $instance->getJobExpiration($job);
  2976. }
  2977. /**
  2978. * Register a callback to be executed when creating job payloads.
  2979. *
  2980. * @param callable $callback
  2981. * @return void
  2982. * @staticsss
  2983. */
  2984. public static function createPayloadUsing($callback)
  2985. {
  2986. //Method inherited from \Illuminate\Queue\Queue
  2987. \Illuminate\Queue\SyncQueue::createPayloadUsing($callback);
  2988. }
  2989. /**
  2990. * Set the IoC container instance.
  2991. *
  2992. * @param \Illuminate\Container\Container $container
  2993. * @return void
  2994. * @staticsss
  2995. */
  2996. public static function setContainer($container)
  2997. {
  2998. //Method inherited from \Illuminate\Queue\Queue
  2999. /** @var \Illuminate\Queue\SyncQueue $instance */
  3000. $instance->setContainer($container);
  3001. }
  3002. }
  3003. /**
  3004. *
  3005. *
  3006. * @see \Illuminate\Database\Schema\Builder
  3007. */
  3008. class Schema {
  3009. /**
  3010. * Determine if the given table exists.
  3011. *
  3012. * @param string $table
  3013. * @return bool
  3014. * @staticsss
  3015. */
  3016. public static function hasTable($table)
  3017. {
  3018. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3019. return $instance->hasTable($table);
  3020. }
  3021. /**
  3022. * Get the column listing for a given table.
  3023. *
  3024. * @param string $table
  3025. * @return array
  3026. * @staticsss
  3027. */
  3028. public static function getColumnListing($table)
  3029. {
  3030. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3031. return $instance->getColumnListing($table);
  3032. }
  3033. /**
  3034. * Drop all tables from the database.
  3035. *
  3036. * @return void
  3037. * @staticsss
  3038. */
  3039. public static function dropAllTables()
  3040. {
  3041. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3042. $instance->dropAllTables();
  3043. }
  3044. /**
  3045. * Drop all views from the database.
  3046. *
  3047. * @return void
  3048. * @staticsss
  3049. */
  3050. public static function dropAllViews()
  3051. {
  3052. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3053. $instance->dropAllViews();
  3054. }
  3055. /**
  3056. * Get all of the table names for the database.
  3057. *
  3058. * @return array
  3059. * @staticsss
  3060. */
  3061. public static function getAllTables()
  3062. {
  3063. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3064. return $instance->getAllTables();
  3065. }
  3066. /**
  3067. * Get all of the view names for the database.
  3068. *
  3069. * @return array
  3070. * @staticsss
  3071. */
  3072. public static function getAllViews()
  3073. {
  3074. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3075. return $instance->getAllViews();
  3076. }
  3077. /**
  3078. * Set the default string length for migrations.
  3079. *
  3080. * @param int $length
  3081. * @return void
  3082. * @staticsss
  3083. */
  3084. public static function defaultStringLength($length)
  3085. {
  3086. //Method inherited from \Illuminate\Database\Schema\Builder
  3087. \Illuminate\Database\Schema\MySqlBuilder::defaultStringLength($length);
  3088. }
  3089. /**
  3090. * Determine if the given table has a given column.
  3091. *
  3092. * @param string $table
  3093. * @param string $column
  3094. * @return bool
  3095. * @staticsss
  3096. */
  3097. public static function hasColumn($table, $column)
  3098. {
  3099. //Method inherited from \Illuminate\Database\Schema\Builder
  3100. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3101. return $instance->hasColumn($table, $column);
  3102. }
  3103. /**
  3104. * Determine if the given table has given columns.
  3105. *
  3106. * @param string $table
  3107. * @param array $columns
  3108. * @return bool
  3109. * @staticsss
  3110. */
  3111. public static function hasColumns($table, $columns)
  3112. {
  3113. //Method inherited from \Illuminate\Database\Schema\Builder
  3114. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3115. return $instance->hasColumns($table, $columns);
  3116. }
  3117. /**
  3118. * Get the data type for the given column name.
  3119. *
  3120. * @param string $table
  3121. * @param string $column
  3122. * @return string
  3123. * @staticsss
  3124. */
  3125. public static function getColumnType($table, $column)
  3126. {
  3127. //Method inherited from \Illuminate\Database\Schema\Builder
  3128. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3129. return $instance->getColumnType($table, $column);
  3130. }
  3131. /**
  3132. * Modify a table on the schema.
  3133. *
  3134. * @param string $table
  3135. * @param \Closure $callback
  3136. * @return void
  3137. * @staticsss
  3138. */
  3139. public static function table($table, $callback)
  3140. {
  3141. //Method inherited from \Illuminate\Database\Schema\Builder
  3142. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3143. $instance->table($table, $callback);
  3144. }
  3145. /**
  3146. * Create a new table on the schema.
  3147. *
  3148. * @param string $table
  3149. * @param \Closure $callback
  3150. * @return void
  3151. * @staticsss
  3152. */
  3153. public static function create($table, $callback)
  3154. {
  3155. //Method inherited from \Illuminate\Database\Schema\Builder
  3156. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3157. $instance->create($table, $callback);
  3158. }
  3159. /**
  3160. * Drop a table from the schema.
  3161. *
  3162. * @param string $table
  3163. * @return void
  3164. * @staticsss
  3165. */
  3166. public static function drop($table)
  3167. {
  3168. //Method inherited from \Illuminate\Database\Schema\Builder
  3169. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3170. $instance->drop($table);
  3171. }
  3172. /**
  3173. * Drop a table from the schema if it exists.
  3174. *
  3175. * @param string $table
  3176. * @return void
  3177. * @staticsss
  3178. */
  3179. public static function dropIfExists($table)
  3180. {
  3181. //Method inherited from \Illuminate\Database\Schema\Builder
  3182. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3183. $instance->dropIfExists($table);
  3184. }
  3185. /**
  3186. * Drop all types from the database.
  3187. *
  3188. * @return void
  3189. * @throws \LogicException
  3190. * @staticsss
  3191. */
  3192. public static function dropAllTypes()
  3193. {
  3194. //Method inherited from \Illuminate\Database\Schema\Builder
  3195. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3196. $instance->dropAllTypes();
  3197. }
  3198. /**
  3199. * Rename a table on the schema.
  3200. *
  3201. * @param string $from
  3202. * @param string $to
  3203. * @return void
  3204. * @staticsss
  3205. */
  3206. public static function rename($from, $to)
  3207. {
  3208. //Method inherited from \Illuminate\Database\Schema\Builder
  3209. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3210. $instance->rename($from, $to);
  3211. }
  3212. /**
  3213. * Enable foreign key constraints.
  3214. *
  3215. * @return bool
  3216. * @staticsss
  3217. */
  3218. public static function enableForeignKeyConstraints()
  3219. {
  3220. //Method inherited from \Illuminate\Database\Schema\Builder
  3221. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3222. return $instance->enableForeignKeyConstraints();
  3223. }
  3224. /**
  3225. * Disable foreign key constraints.
  3226. *
  3227. * @return bool
  3228. * @staticsss
  3229. */
  3230. public static function disableForeignKeyConstraints()
  3231. {
  3232. //Method inherited from \Illuminate\Database\Schema\Builder
  3233. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3234. return $instance->disableForeignKeyConstraints();
  3235. }
  3236. /**
  3237. * Register a custom Doctrine mapping type.
  3238. *
  3239. * @param string $class
  3240. * @param string $name
  3241. * @param string $type
  3242. * @return void
  3243. * @throws \Doctrine\DBAL\DBALException
  3244. * @staticsss
  3245. */
  3246. public static function registerCustomDoctrineType($class, $name, $type)
  3247. {
  3248. //Method inherited from \Illuminate\Database\Schema\Builder
  3249. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3250. $instance->registerCustomDoctrineType($class, $name, $type);
  3251. }
  3252. /**
  3253. * Get the database connection instance.
  3254. *
  3255. * @return \Illuminate\Database\Connection
  3256. * @staticsss
  3257. */
  3258. public static function getConnection()
  3259. {
  3260. //Method inherited from \Illuminate\Database\Schema\Builder
  3261. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3262. return $instance->getConnection();
  3263. }
  3264. /**
  3265. * Set the database connection instance.
  3266. *
  3267. * @param \Illuminate\Database\Connection $connection
  3268. * @return \Illuminate\Database\Schema\MySqlBuilder
  3269. * @staticsss
  3270. */
  3271. public static function setConnection($connection)
  3272. {
  3273. //Method inherited from \Illuminate\Database\Schema\Builder
  3274. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3275. return $instance->setConnection($connection);
  3276. }
  3277. /**
  3278. * Set the Schema Blueprint resolver callback.
  3279. *
  3280. * @param \Closure $resolver
  3281. * @return void
  3282. * @staticsss
  3283. */
  3284. public static function blueprintResolver($resolver)
  3285. {
  3286. //Method inherited from \Illuminate\Database\Schema\Builder
  3287. /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */
  3288. $instance->blueprintResolver($resolver);
  3289. }
  3290. }
  3291. /**
  3292. *
  3293. *
  3294. * @see \Illuminate\Filesystem\FilesystemManager
  3295. */
  3296. class Storage {
  3297. /**
  3298. * Get a filesystem instance.
  3299. *
  3300. * @param string|null $name
  3301. * @return \Illuminate\Filesystem\FilesystemAdapter
  3302. * @staticsss
  3303. */
  3304. public static function drive($name = null)
  3305. {
  3306. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3307. return $instance->drive($name);
  3308. }
  3309. /**
  3310. * Get a filesystem instance.
  3311. *
  3312. * @param string|null $name
  3313. * @return \Illuminate\Filesystem\FilesystemAdapter
  3314. * @staticsss
  3315. */
  3316. public static function disk($name = null)
  3317. {
  3318. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3319. return $instance->disk($name);
  3320. }
  3321. /**
  3322. * Get a default cloud filesystem instance.
  3323. *
  3324. * @return \Illuminate\Filesystem\FilesystemAdapter
  3325. * @staticsss
  3326. */
  3327. public static function cloud()
  3328. {
  3329. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3330. return $instance->cloud();
  3331. }
  3332. /**
  3333. * Create an instance of the local driver.
  3334. *
  3335. * @param array $config
  3336. * @return \Illuminate\Filesystem\FilesystemAdapter
  3337. * @staticsss
  3338. */
  3339. public static function createLocalDriver($config)
  3340. {
  3341. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3342. return $instance->createLocalDriver($config);
  3343. }
  3344. /**
  3345. * Create an instance of the ftp driver.
  3346. *
  3347. * @param array $config
  3348. * @return \Illuminate\Filesystem\FilesystemAdapter
  3349. * @staticsss
  3350. */
  3351. public static function createFtpDriver($config)
  3352. {
  3353. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3354. return $instance->createFtpDriver($config);
  3355. }
  3356. /**
  3357. * Create an instance of the sftp driver.
  3358. *
  3359. * @param array $config
  3360. * @return \Illuminate\Filesystem\FilesystemAdapter
  3361. * @staticsss
  3362. */
  3363. public static function createSftpDriver($config)
  3364. {
  3365. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3366. return $instance->createSftpDriver($config);
  3367. }
  3368. /**
  3369. * Create an instance of the Amazon S3 driver.
  3370. *
  3371. * @param array $config
  3372. * @return \Illuminate\Contracts\Filesystem\Cloud
  3373. * @staticsss
  3374. */
  3375. public static function createS3Driver($config)
  3376. {
  3377. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3378. return $instance->createS3Driver($config);
  3379. }
  3380. /**
  3381. * Set the given disk instance.
  3382. *
  3383. * @param string $name
  3384. * @param mixed $disk
  3385. * @return \Illuminate\Filesystem\FilesystemManager
  3386. * @staticsss
  3387. */
  3388. public static function set($name, $disk)
  3389. {
  3390. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3391. return $instance->set($name, $disk);
  3392. }
  3393. /**
  3394. * Get the default driver name.
  3395. *
  3396. * @return string
  3397. * @staticsss
  3398. */
  3399. public static function getDefaultDriver()
  3400. {
  3401. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3402. return $instance->getDefaultDriver();
  3403. }
  3404. /**
  3405. * Get the default cloud driver name.
  3406. *
  3407. * @return string
  3408. * @staticsss
  3409. */
  3410. public static function getDefaultCloudDriver()
  3411. {
  3412. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3413. return $instance->getDefaultCloudDriver();
  3414. }
  3415. /**
  3416. * Unset the given disk instances.
  3417. *
  3418. * @param array|string $disk
  3419. * @return \Illuminate\Filesystem\FilesystemManager
  3420. * @staticsss
  3421. */
  3422. public static function forgetDisk($disk)
  3423. {
  3424. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3425. return $instance->forgetDisk($disk);
  3426. }
  3427. /**
  3428. * Register a custom driver creator Closure.
  3429. *
  3430. * @param string $driver
  3431. * @param \Closure $callback
  3432. * @return \Illuminate\Filesystem\FilesystemManager
  3433. * @staticsss
  3434. */
  3435. public static function extend($driver, $callback)
  3436. {
  3437. /** @var \Illuminate\Filesystem\FilesystemManager $instance */
  3438. return $instance->extend($driver, $callback);
  3439. }
  3440. /**
  3441. * Assert that the given file exists.
  3442. *
  3443. * @param string|array $path
  3444. * @return \Illuminate\Filesystem\FilesystemAdapter
  3445. * @staticsss
  3446. */
  3447. public static function assertExists($path)
  3448. {
  3449. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3450. return $instance->assertExists($path);
  3451. }
  3452. /**
  3453. * Assert that the given file does not exist.
  3454. *
  3455. * @param string|array $path
  3456. * @return \Illuminate\Filesystem\FilesystemAdapter
  3457. * @staticsss
  3458. */
  3459. public static function assertMissing($path)
  3460. {
  3461. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3462. return $instance->assertMissing($path);
  3463. }
  3464. /**
  3465. * Determine if a file exists.
  3466. *
  3467. * @param string $path
  3468. * @return bool
  3469. * @staticsss
  3470. */
  3471. public static function exists($path)
  3472. {
  3473. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3474. return $instance->exists($path);
  3475. }
  3476. /**
  3477. * Determine if a file or directory is missing.
  3478. *
  3479. * @param string $path
  3480. * @return bool
  3481. * @staticsss
  3482. */
  3483. public static function missing($path)
  3484. {
  3485. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3486. return $instance->missing($path);
  3487. }
  3488. /**
  3489. * Get the full path for the file at the given "short" path.
  3490. *
  3491. * @param string $path
  3492. * @return string
  3493. * @staticsss
  3494. */
  3495. public static function path($path)
  3496. {
  3497. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3498. return $instance->path($path);
  3499. }
  3500. /**
  3501. * Get the contents of a file.
  3502. *
  3503. * @param string $path
  3504. * @return string
  3505. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  3506. * @staticsss
  3507. */
  3508. public static function get($path)
  3509. {
  3510. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3511. return $instance->get($path);
  3512. }
  3513. /**
  3514. * Create a streamed response for a given file.
  3515. *
  3516. * @param string $path
  3517. * @param string|null $name
  3518. * @param array|null $headers
  3519. * @param string|null $disposition
  3520. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  3521. * @staticsss
  3522. */
  3523. public static function response($path, $name = null, $headers = [], $disposition = 'inline')
  3524. {
  3525. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3526. return $instance->response($path, $name, $headers, $disposition);
  3527. }
  3528. /**
  3529. * Create a streamed download response for a given file.
  3530. *
  3531. * @param string $path
  3532. * @param string|null $name
  3533. * @param array|null $headers
  3534. * @return \Symfony\Component\HttpFoundation\StreamedResponse
  3535. * @staticsss
  3536. */
  3537. public static function download($path, $name = null, $headers = [])
  3538. {
  3539. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3540. return $instance->download($path, $name, $headers);
  3541. }
  3542. /**
  3543. * Write the contents of a file.
  3544. *
  3545. * @param string $path
  3546. * @param string|resource $contents
  3547. * @param mixed $options
  3548. * @return bool
  3549. * @staticsss
  3550. */
  3551. public static function put($path, $contents, $options = [])
  3552. {
  3553. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3554. return $instance->put($path, $contents, $options);
  3555. }
  3556. /**
  3557. * Store the uploaded file on the disk.
  3558. *
  3559. * @param string $path
  3560. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
  3561. * @param array $options
  3562. * @return string|false
  3563. * @staticsss
  3564. */
  3565. public static function putFile($path, $file, $options = [])
  3566. {
  3567. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3568. return $instance->putFile($path, $file, $options);
  3569. }
  3570. /**
  3571. * Store the uploaded file on the disk with a given name.
  3572. *
  3573. * @param string $path
  3574. * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
  3575. * @param string $name
  3576. * @param array $options
  3577. * @return string|false
  3578. * @staticsss
  3579. */
  3580. public static function putFileAs($path, $file, $name, $options = [])
  3581. {
  3582. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3583. return $instance->putFileAs($path, $file, $name, $options);
  3584. }
  3585. /**
  3586. * Get the visibility for the given path.
  3587. *
  3588. * @param string $path
  3589. * @return string
  3590. * @staticsss
  3591. */
  3592. public static function getVisibility($path)
  3593. {
  3594. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3595. return $instance->getVisibility($path);
  3596. }
  3597. /**
  3598. * Set the visibility for the given path.
  3599. *
  3600. * @param string $path
  3601. * @param string $visibility
  3602. * @return bool
  3603. * @staticsss
  3604. */
  3605. public static function setVisibility($path, $visibility)
  3606. {
  3607. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3608. return $instance->setVisibility($path, $visibility);
  3609. }
  3610. /**
  3611. * Prepend to a file.
  3612. *
  3613. * @param string $path
  3614. * @param string $data
  3615. * @param string $separator
  3616. * @return bool
  3617. * @staticsss
  3618. */
  3619. public static function prepend($path, $data, $separator = '')
  3620. {
  3621. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3622. return $instance->prepend($path, $data, $separator);
  3623. }
  3624. /**
  3625. * Append to a file.
  3626. *
  3627. * @param string $path
  3628. * @param string $data
  3629. * @param string $separator
  3630. * @return bool
  3631. * @staticsss
  3632. */
  3633. public static function append($path, $data, $separator = '')
  3634. {
  3635. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3636. return $instance->append($path, $data, $separator);
  3637. }
  3638. /**
  3639. * Delete the file at a given path.
  3640. *
  3641. * @param string|array $paths
  3642. * @return bool
  3643. * @staticsss
  3644. */
  3645. public static function delete($paths)
  3646. {
  3647. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3648. return $instance->delete($paths);
  3649. }
  3650. /**
  3651. * Copy a file to a new location.
  3652. *
  3653. * @param string $from
  3654. * @param string $to
  3655. * @return bool
  3656. * @staticsss
  3657. */
  3658. public static function copy($from, $to)
  3659. {
  3660. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3661. return $instance->copy($from, $to);
  3662. }
  3663. /**
  3664. * Move a file to a new location.
  3665. *
  3666. * @param string $from
  3667. * @param string $to
  3668. * @return bool
  3669. * @staticsss
  3670. */
  3671. public static function move($from, $to)
  3672. {
  3673. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3674. return $instance->move($from, $to);
  3675. }
  3676. /**
  3677. * Get the file size of a given file.
  3678. *
  3679. * @param string $path
  3680. * @return int
  3681. * @staticsss
  3682. */
  3683. public static function size($path)
  3684. {
  3685. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3686. return $instance->size($path);
  3687. }
  3688. /**
  3689. * Get the mime-type of a given file.
  3690. *
  3691. * @param string $path
  3692. * @return string|false
  3693. * @staticsss
  3694. */
  3695. public static function mimeType($path)
  3696. {
  3697. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3698. return $instance->mimeType($path);
  3699. }
  3700. /**
  3701. * Get the file's last modification time.
  3702. *
  3703. * @param string $path
  3704. * @return int
  3705. * @staticsss
  3706. */
  3707. public static function lastModified($path)
  3708. {
  3709. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3710. return $instance->lastModified($path);
  3711. }
  3712. /**
  3713. * Get the URL for the file at the given path.
  3714. *
  3715. * @param string $path
  3716. * @return string
  3717. * @throws \RuntimeException
  3718. * @staticsss
  3719. */
  3720. public static function url($path)
  3721. {
  3722. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3723. return $instance->url($path);
  3724. }
  3725. /**
  3726. * Get a resource to read the file.
  3727. *
  3728. * @param string $path
  3729. * @return resource|null The path resource or null on failure.
  3730. * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
  3731. * @staticsss
  3732. */
  3733. public static function readStream($path)
  3734. {
  3735. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3736. return $instance->readStream($path);
  3737. }
  3738. /**
  3739. * Write a new file using a stream.
  3740. *
  3741. * @param string $path
  3742. * @param resource $resource
  3743. * @param array $options
  3744. * @return bool
  3745. * @throws \InvalidArgumentException If $resource is not a file handle.
  3746. * @throws \Illuminate\Contracts\Filesystem\FileExistsException
  3747. * @staticsss
  3748. */
  3749. public static function writeStream($path, $resource, $options = [])
  3750. {
  3751. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3752. return $instance->writeStream($path, $resource, $options);
  3753. }
  3754. /**
  3755. * Get a temporary URL for the file at the given path.
  3756. *
  3757. * @param string $path
  3758. * @param \DateTimeInterface $expiration
  3759. * @param array $options
  3760. * @return string
  3761. * @throws \RuntimeException
  3762. * @staticsss
  3763. */
  3764. public static function temporaryUrl($path, $expiration, $options = [])
  3765. {
  3766. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3767. return $instance->temporaryUrl($path, $expiration, $options);
  3768. }
  3769. /**
  3770. * Get a temporary URL for the file at the given path.
  3771. *
  3772. * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter
  3773. * @param string $path
  3774. * @param \DateTimeInterface $expiration
  3775. * @param array $options
  3776. * @return string
  3777. * @staticsss
  3778. */
  3779. public static function getAwsTemporaryUrl($adapter, $path, $expiration, $options)
  3780. {
  3781. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3782. return $instance->getAwsTemporaryUrl($adapter, $path, $expiration, $options);
  3783. }
  3784. /**
  3785. * Get an array of all files in a directory.
  3786. *
  3787. * @param string|null $directory
  3788. * @param bool $recursive
  3789. * @return array
  3790. * @staticsss
  3791. */
  3792. public static function files($directory = null, $recursive = false)
  3793. {
  3794. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3795. return $instance->files($directory, $recursive);
  3796. }
  3797. /**
  3798. * Get all of the files from the given directory (recursive).
  3799. *
  3800. * @param string|null $directory
  3801. * @return array
  3802. * @staticsss
  3803. */
  3804. public static function allFiles($directory = null)
  3805. {
  3806. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3807. return $instance->allFiles($directory);
  3808. }
  3809. /**
  3810. * Get all of the directories within a given directory.
  3811. *
  3812. * @param string|null $directory
  3813. * @param bool $recursive
  3814. * @return array
  3815. * @staticsss
  3816. */
  3817. public static function directories($directory = null, $recursive = false)
  3818. {
  3819. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3820. return $instance->directories($directory, $recursive);
  3821. }
  3822. /**
  3823. * Get all (recursive) of the directories within a given directory.
  3824. *
  3825. * @param string|null $directory
  3826. * @return array
  3827. * @staticsss
  3828. */
  3829. public static function allDirectories($directory = null)
  3830. {
  3831. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3832. return $instance->allDirectories($directory);
  3833. }
  3834. /**
  3835. * Create a directory.
  3836. *
  3837. * @param string $path
  3838. * @return bool
  3839. * @staticsss
  3840. */
  3841. public static function makeDirectory($path)
  3842. {
  3843. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3844. return $instance->makeDirectory($path);
  3845. }
  3846. /**
  3847. * Recursively delete a directory.
  3848. *
  3849. * @param string $directory
  3850. * @return bool
  3851. * @staticsss
  3852. */
  3853. public static function deleteDirectory($directory)
  3854. {
  3855. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3856. return $instance->deleteDirectory($directory);
  3857. }
  3858. /**
  3859. * Flush the Flysystem cache.
  3860. *
  3861. * @return void
  3862. * @staticsss
  3863. */
  3864. public static function flushCache()
  3865. {
  3866. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3867. $instance->flushCache();
  3868. }
  3869. /**
  3870. * Get the Flysystem driver.
  3871. *
  3872. * @return \League\Flysystem\FilesystemInterface
  3873. * @staticsss
  3874. */
  3875. public static function getDriver()
  3876. {
  3877. /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */
  3878. return $instance->getDriver();
  3879. }
  3880. }
  3881. /**
  3882. *
  3883. *
  3884. * @see \Illuminate\Validation\Factory
  3885. */
  3886. class Validator {
  3887. /**
  3888. * Create a new Validator instance.
  3889. *
  3890. * @param array $data
  3891. * @param array $rules
  3892. * @param array $messages
  3893. * @param array $customAttributes
  3894. * @return \Illuminate\Validation\Validator
  3895. * @staticsss
  3896. */
  3897. public static function make($data, $rules, $messages = [], $customAttributes = [])
  3898. {
  3899. /** @var \Illuminate\Validation\Factory $instance */
  3900. return $instance->make($data, $rules, $messages, $customAttributes);
  3901. }
  3902. /**
  3903. * Validate the given data against the provided rules.
  3904. *
  3905. * @param array $data
  3906. * @param array $rules
  3907. * @param array $messages
  3908. * @param array $customAttributes
  3909. * @return array
  3910. * @throws \Illuminate\Validation\ValidationException
  3911. * @staticsss
  3912. */
  3913. public static function validate($data, $rules, $messages = [], $customAttributes = [])
  3914. {
  3915. /** @var \Illuminate\Validation\Factory $instance */
  3916. return $instance->validate($data, $rules, $messages, $customAttributes);
  3917. }
  3918. /**
  3919. * Register a custom validator extension.
  3920. *
  3921. * @param string $rule
  3922. * @param \Closure|string $extension
  3923. * @param string|null $message
  3924. * @return void
  3925. * @staticsss
  3926. */
  3927. public static function extend($rule, $extension, $message = null)
  3928. {
  3929. /** @var \Illuminate\Validation\Factory $instance */
  3930. $instance->extend($rule, $extension, $message);
  3931. }
  3932. /**
  3933. * Register a custom implicit validator extension.
  3934. *
  3935. * @param string $rule
  3936. * @param \Closure|string $extension
  3937. * @param string|null $message
  3938. * @return void
  3939. * @staticsss
  3940. */
  3941. public static function extendImplicit($rule, $extension, $message = null)
  3942. {
  3943. /** @var \Illuminate\Validation\Factory $instance */
  3944. $instance->extendImplicit($rule, $extension, $message);
  3945. }
  3946. /**
  3947. * Register a custom dependent validator extension.
  3948. *
  3949. * @param string $rule
  3950. * @param \Closure|string $extension
  3951. * @param string|null $message
  3952. * @return void
  3953. * @staticsss
  3954. */
  3955. public static function extendDependent($rule, $extension, $message = null)
  3956. {
  3957. /** @var \Illuminate\Validation\Factory $instance */
  3958. $instance->extendDependent($rule, $extension, $message);
  3959. }
  3960. /**
  3961. * Register a custom validator message replacer.
  3962. *
  3963. * @param string $rule
  3964. * @param \Closure|string $replacer
  3965. * @return void
  3966. * @staticsss
  3967. */
  3968. public static function replacer($rule, $replacer)
  3969. {
  3970. /** @var \Illuminate\Validation\Factory $instance */
  3971. $instance->replacer($rule, $replacer);
  3972. }
  3973. /**
  3974. * Set the Validator instance resolver.
  3975. *
  3976. * @param \Closure $resolver
  3977. * @return void
  3978. * @staticsss
  3979. */
  3980. public static function resolver($resolver)
  3981. {
  3982. /** @var \Illuminate\Validation\Factory $instance */
  3983. $instance->resolver($resolver);
  3984. }
  3985. /**
  3986. * Get the Translator implementation.
  3987. *
  3988. * @return \Illuminate\Contracts\Translation\Translator
  3989. * @staticsss
  3990. */
  3991. public static function getTranslator()
  3992. {
  3993. /** @var \Illuminate\Validation\Factory $instance */
  3994. return $instance->getTranslator();
  3995. }
  3996. /**
  3997. * Get the Presence Verifier implementation.
  3998. *
  3999. * @return \Illuminate\Validation\PresenceVerifierInterface
  4000. * @staticsss
  4001. */
  4002. public static function getPresenceVerifier()
  4003. {
  4004. /** @var \Illuminate\Validation\Factory $instance */
  4005. return $instance->getPresenceVerifier();
  4006. }
  4007. /**
  4008. * Set the Presence Verifier implementation.
  4009. *
  4010. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  4011. * @return void
  4012. * @staticsss
  4013. */
  4014. public static function setPresenceVerifier($presenceVerifier)
  4015. {
  4016. /** @var \Illuminate\Validation\Factory $instance */
  4017. $instance->setPresenceVerifier($presenceVerifier);
  4018. }
  4019. }
  4020. /**
  4021. *
  4022. *
  4023. * @see \Illuminate\Contracts\Auth\Access\Gate
  4024. */
  4025. class Gate {
  4026. /**
  4027. * Determine if a given ability has been defined.
  4028. *
  4029. * @param string|array $ability
  4030. * @return bool
  4031. * @staticsss
  4032. */
  4033. public static function has($ability)
  4034. {
  4035. /** @var \Illuminate\Auth\Access\Gate $instance */
  4036. return $instance->has($ability);
  4037. }
  4038. /**
  4039. * Define a new ability.
  4040. *
  4041. * @param string $ability
  4042. * @param callable|string $callback
  4043. * @return \Illuminate\Auth\Access\Gate
  4044. * @throws \InvalidArgumentException
  4045. * @staticsss
  4046. */
  4047. public static function define($ability, $callback)
  4048. {
  4049. /** @var \Illuminate\Auth\Access\Gate $instance */
  4050. return $instance->define($ability, $callback);
  4051. }
  4052. /**
  4053. * Define abilities for a resource.
  4054. *
  4055. * @param string $name
  4056. * @param string $class
  4057. * @param array|null $abilities
  4058. * @return \Illuminate\Auth\Access\Gate
  4059. * @staticsss
  4060. */
  4061. public static function resource($name, $class, $abilities = null)
  4062. {
  4063. /** @var \Illuminate\Auth\Access\Gate $instance */
  4064. return $instance->resource($name, $class, $abilities);
  4065. }
  4066. /**
  4067. * Define a policy class for a given class type.
  4068. *
  4069. * @param string $class
  4070. * @param string $policy
  4071. * @return \Illuminate\Auth\Access\Gate
  4072. * @staticsss
  4073. */
  4074. public static function policy($class, $policy)
  4075. {
  4076. /** @var \Illuminate\Auth\Access\Gate $instance */
  4077. return $instance->policy($class, $policy);
  4078. }
  4079. /**
  4080. * Register a callback to run before all Gate checks.
  4081. *
  4082. * @param callable $callback
  4083. * @return \Illuminate\Auth\Access\Gate
  4084. * @staticsss
  4085. */
  4086. public static function before($callback)
  4087. {
  4088. /** @var \Illuminate\Auth\Access\Gate $instance */
  4089. return $instance->before($callback);
  4090. }
  4091. /**
  4092. * Register a callback to run after all Gate checks.
  4093. *
  4094. * @param callable $callback
  4095. * @return \Illuminate\Auth\Access\Gate
  4096. * @staticsss
  4097. */
  4098. public static function after($callback)
  4099. {
  4100. /** @var \Illuminate\Auth\Access\Gate $instance */
  4101. return $instance->after($callback);
  4102. }
  4103. /**
  4104. * Determine if the given ability should be granted for the current user.
  4105. *
  4106. * @param string $ability
  4107. * @param array|mixed $arguments
  4108. * @return bool
  4109. * @staticsss
  4110. */
  4111. public static function allows($ability, $arguments = [])
  4112. {
  4113. /** @var \Illuminate\Auth\Access\Gate $instance */
  4114. return $instance->allows($ability, $arguments);
  4115. }
  4116. /**
  4117. * Determine if the given ability should be denied for the current user.
  4118. *
  4119. * @param string $ability
  4120. * @param array|mixed $arguments
  4121. * @return bool
  4122. * @staticsss
  4123. */
  4124. public static function denies($ability, $arguments = [])
  4125. {
  4126. /** @var \Illuminate\Auth\Access\Gate $instance */
  4127. return $instance->denies($ability, $arguments);
  4128. }
  4129. /**
  4130. * Determine if all of the given abilities should be granted for the current user.
  4131. *
  4132. * @param \Illuminate\Auth\Access\iterable|string $abilities
  4133. * @param array|mixed $arguments
  4134. * @return bool
  4135. * @staticsss
  4136. */
  4137. public static function check($abilities, $arguments = [])
  4138. {
  4139. /** @var \Illuminate\Auth\Access\Gate $instance */
  4140. return $instance->check($abilities, $arguments);
  4141. }
  4142. /**
  4143. * Determine if any one of the given abilities should be granted for the current user.
  4144. *
  4145. * @param \Illuminate\Auth\Access\iterable|string $abilities
  4146. * @param array|mixed $arguments
  4147. * @return bool
  4148. * @staticsss
  4149. */
  4150. public static function any($abilities, $arguments = [])
  4151. {
  4152. /** @var \Illuminate\Auth\Access\Gate $instance */
  4153. return $instance->any($abilities, $arguments);
  4154. }
  4155. /**
  4156. * Determine if all of the given abilities should be denied for the current user.
  4157. *
  4158. * @param \Illuminate\Auth\Access\iterable|string $abilities
  4159. * @param array|mixed $arguments
  4160. * @return bool
  4161. * @staticsss
  4162. */
  4163. public static function none($abilities, $arguments = [])
  4164. {
  4165. /** @var \Illuminate\Auth\Access\Gate $instance */
  4166. return $instance->none($abilities, $arguments);
  4167. }
  4168. /**
  4169. * Determine if the given ability should be granted for the current user.
  4170. *
  4171. * @param string $ability
  4172. * @param array|mixed $arguments
  4173. * @return \Illuminate\Auth\Access\Response
  4174. * @throws \Illuminate\Auth\Access\AuthorizationException
  4175. * @staticsss
  4176. */
  4177. public static function authorize($ability, $arguments = [])
  4178. {
  4179. /** @var \Illuminate\Auth\Access\Gate $instance */
  4180. return $instance->authorize($ability, $arguments);
  4181. }
  4182. /**
  4183. * Inspect the user for the given ability.
  4184. *
  4185. * @param string $ability
  4186. * @param array|mixed $arguments
  4187. * @return \Illuminate\Auth\Access\Response
  4188. * @staticsss
  4189. */
  4190. public static function inspect($ability, $arguments = [])
  4191. {
  4192. /** @var \Illuminate\Auth\Access\Gate $instance */
  4193. return $instance->inspect($ability, $arguments);
  4194. }
  4195. /**
  4196. * Get the raw result from the authorization callback.
  4197. *
  4198. * @param string $ability
  4199. * @param array|mixed $arguments
  4200. * @return mixed
  4201. * @throws \Illuminate\Auth\Access\AuthorizationException
  4202. * @staticsss
  4203. */
  4204. public static function raw($ability, $arguments = [])
  4205. {
  4206. /** @var \Illuminate\Auth\Access\Gate $instance */
  4207. return $instance->raw($ability, $arguments);
  4208. }
  4209. /**
  4210. * Get a policy instance for a given class.
  4211. *
  4212. * @param object|string $class
  4213. * @return mixed
  4214. * @staticsss
  4215. */
  4216. public static function getPolicyFor($class)
  4217. {
  4218. /** @var \Illuminate\Auth\Access\Gate $instance */
  4219. return $instance->getPolicyFor($class);
  4220. }
  4221. /**
  4222. * Specify a callback to be used to guess policy names.
  4223. *
  4224. * @param callable $callback
  4225. * @return \Illuminate\Auth\Access\Gate
  4226. * @staticsss
  4227. */
  4228. public static function guessPolicyNamesUsing($callback)
  4229. {
  4230. /** @var \Illuminate\Auth\Access\Gate $instance */
  4231. return $instance->guessPolicyNamesUsing($callback);
  4232. }
  4233. /**
  4234. * Build a policy class instance of the given type.
  4235. *
  4236. * @param object|string $class
  4237. * @return mixed
  4238. * @throws \Illuminate\Contracts\Container\BindingResolutionException
  4239. * @staticsss
  4240. */
  4241. public static function resolvePolicy($class)
  4242. {
  4243. /** @var \Illuminate\Auth\Access\Gate $instance */
  4244. return $instance->resolvePolicy($class);
  4245. }
  4246. /**
  4247. * Get a gate instance for the given user.
  4248. *
  4249. * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
  4250. * @return static
  4251. * @staticsss
  4252. */
  4253. public static function forUser($user)
  4254. {
  4255. /** @var \Illuminate\Auth\Access\Gate $instance */
  4256. return $instance->forUser($user);
  4257. }
  4258. /**
  4259. * Get all of the defined abilities.
  4260. *
  4261. * @return array
  4262. * @staticsss
  4263. */
  4264. public static function abilities()
  4265. {
  4266. /** @var \Illuminate\Auth\Access\Gate $instance */
  4267. return $instance->abilities();
  4268. }
  4269. /**
  4270. * Get all of the defined policies.
  4271. *
  4272. * @return array
  4273. * @staticsss
  4274. */
  4275. public static function policies()
  4276. {
  4277. /** @var \Illuminate\Auth\Access\Gate $instance */
  4278. return $instance->policies();
  4279. }
  4280. }
  4281. }
  4282. namespace {
  4283. class Auth extends \Illuminate\Support\Facades\Auth {}
  4284. class DB extends \Illuminate\Support\Facades\DB {}
  4285. class Cache extends \Illuminate\Support\Facades\Cache {}
  4286. class Event extends \Illuminate\Support\Facades\Event {}
  4287. class Log extends \Illuminate\Support\Facades\Log {}
  4288. class Queue extends \Illuminate\Support\Facades\Queue {}
  4289. class Schema extends \Illuminate\Support\Facades\Schema {}
  4290. class Storage extends \Illuminate\Support\Facades\Storage {}
  4291. class Validator extends \Illuminate\Support\Facades\Validator {}
  4292. class Gate extends \Illuminate\Support\Facades\Gate {}
  4293. }