PageRenderTime 47ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 1ms

/_ide_helper.php

https://github.com/mstnorris/wb_bak
PHP | 12298 lines | 3123 code | 1129 blank | 8046 comment | 0 complexity | bf229751caff24cc4addb42a81f6a6ba MD5 | raw file
  1. <?php
  2. /**
  3. * An helper file for Laravel 4, to provide autocomplete information to your IDE
  4. * Generated for Laravel 4.2.16 on 2015-01-10.
  5. *
  6. * @author Barry vd. Heuvel <barryvdh@gmail.com>
  7. * @see https://github.com/barryvdh/laravel-ide-helper
  8. */
  9. namespace {
  10. exit("This file should not be included, only analyzed by your IDE");
  11. class App extends \Illuminate\Support\Facades\App{
  12. /**
  13. * Bind the installation paths to the application.
  14. *
  15. * @param array $paths
  16. * @return void
  17. * @static
  18. */
  19. public static function bindInstallPaths($paths){
  20. \Illuminate\Foundation\Application::bindInstallPaths($paths);
  21. }
  22. /**
  23. * Get the application bootstrap file.
  24. *
  25. * @return string
  26. * @static
  27. */
  28. public static function getBootstrapFile(){
  29. return \Illuminate\Foundation\Application::getBootstrapFile();
  30. }
  31. /**
  32. * Start the exception handling for the request.
  33. *
  34. * @return void
  35. * @static
  36. */
  37. public static function startExceptionHandling(){
  38. \Illuminate\Foundation\Application::startExceptionHandling();
  39. }
  40. /**
  41. * Get or check the current application environment.
  42. *
  43. * @param mixed
  44. * @return string
  45. * @static
  46. */
  47. public static function environment(){
  48. return \Illuminate\Foundation\Application::environment();
  49. }
  50. /**
  51. * Determine if application is in local environment.
  52. *
  53. * @return bool
  54. * @static
  55. */
  56. public static function isLocal(){
  57. return \Illuminate\Foundation\Application::isLocal();
  58. }
  59. /**
  60. * Detect the application's current environment.
  61. *
  62. * @param array|string $envs
  63. * @return string
  64. * @static
  65. */
  66. public static function detectEnvironment($envs){
  67. return \Illuminate\Foundation\Application::detectEnvironment($envs);
  68. }
  69. /**
  70. * Determine if we are running in the console.
  71. *
  72. * @return bool
  73. * @static
  74. */
  75. public static function runningInConsole(){
  76. return \Illuminate\Foundation\Application::runningInConsole();
  77. }
  78. /**
  79. * Determine if we are running unit tests.
  80. *
  81. * @return bool
  82. * @static
  83. */
  84. public static function runningUnitTests(){
  85. return \Illuminate\Foundation\Application::runningUnitTests();
  86. }
  87. /**
  88. * Force register a service provider with the application.
  89. *
  90. * @param \Illuminate\Support\ServiceProvider|string $provider
  91. * @param array $options
  92. * @return \Illuminate\Support\ServiceProvider
  93. * @static
  94. */
  95. public static function forceRegister($provider, $options = array()){
  96. return \Illuminate\Foundation\Application::forceRegister($provider, $options);
  97. }
  98. /**
  99. * Register a service provider with the application.
  100. *
  101. * @param \Illuminate\Support\ServiceProvider|string $provider
  102. * @param array $options
  103. * @param bool $force
  104. * @return \Illuminate\Support\ServiceProvider
  105. * @static
  106. */
  107. public static function register($provider, $options = array(), $force = false){
  108. return \Illuminate\Foundation\Application::register($provider, $options, $force);
  109. }
  110. /**
  111. * Get the registered service provider instance if it exists.
  112. *
  113. * @param \Illuminate\Support\ServiceProvider|string $provider
  114. * @return \Illuminate\Support\ServiceProvider|null
  115. * @static
  116. */
  117. public static function getRegistered($provider){
  118. return \Illuminate\Foundation\Application::getRegistered($provider);
  119. }
  120. /**
  121. * Resolve a service provider instance from the class name.
  122. *
  123. * @param string $provider
  124. * @return \Illuminate\Support\ServiceProvider
  125. * @static
  126. */
  127. public static function resolveProviderClass($provider){
  128. return \Illuminate\Foundation\Application::resolveProviderClass($provider);
  129. }
  130. /**
  131. * Load and boot all of the remaining deferred providers.
  132. *
  133. * @return void
  134. * @static
  135. */
  136. public static function loadDeferredProviders(){
  137. \Illuminate\Foundation\Application::loadDeferredProviders();
  138. }
  139. /**
  140. * Register a deferred provider and service.
  141. *
  142. * @param string $provider
  143. * @param string $service
  144. * @return void
  145. * @static
  146. */
  147. public static function registerDeferredProvider($provider, $service = null){
  148. \Illuminate\Foundation\Application::registerDeferredProvider($provider, $service);
  149. }
  150. /**
  151. * Resolve the given type from the container.
  152. *
  153. * (Overriding Container::make)
  154. *
  155. * @param string $abstract
  156. * @param array $parameters
  157. * @return mixed
  158. * @static
  159. */
  160. public static function make($abstract, $parameters = array()){
  161. return \Illuminate\Foundation\Application::make($abstract, $parameters);
  162. }
  163. /**
  164. * Determine if the given abstract type has been bound.
  165. *
  166. * (Overriding Container::bound)
  167. *
  168. * @param string $abstract
  169. * @return bool
  170. * @static
  171. */
  172. public static function bound($abstract){
  173. return \Illuminate\Foundation\Application::bound($abstract);
  174. }
  175. /**
  176. * "Extend" an abstract type in the container.
  177. *
  178. * (Overriding Container::extend)
  179. *
  180. * @param string $abstract
  181. * @param \Closure $closure
  182. * @return void
  183. * @throws \InvalidArgumentException
  184. * @static
  185. */
  186. public static function extend($abstract, $closure){
  187. \Illuminate\Foundation\Application::extend($abstract, $closure);
  188. }
  189. /**
  190. * Register a "before" application filter.
  191. *
  192. * @param \Closure|string $callback
  193. * @return void
  194. * @static
  195. */
  196. public static function before($callback){
  197. \Illuminate\Foundation\Application::before($callback);
  198. }
  199. /**
  200. * Register an "after" application filter.
  201. *
  202. * @param \Closure|string $callback
  203. * @return void
  204. * @static
  205. */
  206. public static function after($callback){
  207. \Illuminate\Foundation\Application::after($callback);
  208. }
  209. /**
  210. * Register a "finish" application filter.
  211. *
  212. * @param \Closure|string $callback
  213. * @return void
  214. * @static
  215. */
  216. public static function finish($callback){
  217. \Illuminate\Foundation\Application::finish($callback);
  218. }
  219. /**
  220. * Register a "shutdown" callback.
  221. *
  222. * @param callable $callback
  223. * @return void
  224. * @static
  225. */
  226. public static function shutdown($callback = null){
  227. \Illuminate\Foundation\Application::shutdown($callback);
  228. }
  229. /**
  230. * Register a function for determining when to use array sessions.
  231. *
  232. * @param \Closure $callback
  233. * @return void
  234. * @static
  235. */
  236. public static function useArraySessions($callback){
  237. \Illuminate\Foundation\Application::useArraySessions($callback);
  238. }
  239. /**
  240. * Determine if the application has booted.
  241. *
  242. * @return bool
  243. * @static
  244. */
  245. public static function isBooted(){
  246. return \Illuminate\Foundation\Application::isBooted();
  247. }
  248. /**
  249. * Boot the application's service providers.
  250. *
  251. * @return void
  252. * @static
  253. */
  254. public static function boot(){
  255. \Illuminate\Foundation\Application::boot();
  256. }
  257. /**
  258. * Register a new boot listener.
  259. *
  260. * @param mixed $callback
  261. * @return void
  262. * @static
  263. */
  264. public static function booting($callback){
  265. \Illuminate\Foundation\Application::booting($callback);
  266. }
  267. /**
  268. * Register a new "booted" listener.
  269. *
  270. * @param mixed $callback
  271. * @return void
  272. * @static
  273. */
  274. public static function booted($callback){
  275. \Illuminate\Foundation\Application::booted($callback);
  276. }
  277. /**
  278. * Run the application and send the response.
  279. *
  280. * @param \Symfony\Component\HttpFoundation\Request $request
  281. * @return void
  282. * @static
  283. */
  284. public static function run($request = null){
  285. \Illuminate\Foundation\Application::run($request);
  286. }
  287. /**
  288. * Add a HttpKernel middleware onto the stack.
  289. *
  290. * @param string $class
  291. * @param array $parameters
  292. * @return $this
  293. * @static
  294. */
  295. public static function middleware($class, $parameters = array()){
  296. return \Illuminate\Foundation\Application::middleware($class, $parameters);
  297. }
  298. /**
  299. * Remove a custom middleware from the application.
  300. *
  301. * @param string $class
  302. * @return void
  303. * @static
  304. */
  305. public static function forgetMiddleware($class){
  306. \Illuminate\Foundation\Application::forgetMiddleware($class);
  307. }
  308. /**
  309. * Handle the given request and get the response.
  310. *
  311. * Provides compatibility with BrowserKit functional testing.
  312. *
  313. * @implements HttpKernelInterface::handle
  314. * @param \Symfony\Component\HttpFoundation\Request $request
  315. * @param int $type
  316. * @param bool $catch
  317. * @return \Symfony\Component\HttpFoundation\Response
  318. * @throws \Exception
  319. * @static
  320. */
  321. public static function handle($request, $type = 1, $catch = true){
  322. return \Illuminate\Foundation\Application::handle($request, $type, $catch);
  323. }
  324. /**
  325. * Handle the given request and get the response.
  326. *
  327. * @param \Illuminate\Http\Request $request
  328. * @return \Symfony\Component\HttpFoundation\Response
  329. * @static
  330. */
  331. public static function dispatch($request){
  332. return \Illuminate\Foundation\Application::dispatch($request);
  333. }
  334. /**
  335. * Call the "finish" and "shutdown" callbacks assigned to the application.
  336. *
  337. * @param \Symfony\Component\HttpFoundation\Request $request
  338. * @param \Symfony\Component\HttpFoundation\Response $response
  339. * @return void
  340. * @static
  341. */
  342. public static function terminate($request, $response){
  343. \Illuminate\Foundation\Application::terminate($request, $response);
  344. }
  345. /**
  346. * Call the "finish" callbacks assigned to the application.
  347. *
  348. * @param \Symfony\Component\HttpFoundation\Request $request
  349. * @param \Symfony\Component\HttpFoundation\Response $response
  350. * @return void
  351. * @static
  352. */
  353. public static function callFinishCallbacks($request, $response){
  354. \Illuminate\Foundation\Application::callFinishCallbacks($request, $response);
  355. }
  356. /**
  357. * Prepare the request by injecting any services.
  358. *
  359. * @param \Illuminate\Http\Request $request
  360. * @return \Illuminate\Http\Request
  361. * @static
  362. */
  363. public static function prepareRequest($request){
  364. return \Illuminate\Foundation\Application::prepareRequest($request);
  365. }
  366. /**
  367. * Prepare the given value as a Response object.
  368. *
  369. * @param mixed $value
  370. * @return \Symfony\Component\HttpFoundation\Response
  371. * @static
  372. */
  373. public static function prepareResponse($value){
  374. return \Illuminate\Foundation\Application::prepareResponse($value);
  375. }
  376. /**
  377. * Determine if the application is ready for responses.
  378. *
  379. * @return bool
  380. * @static
  381. */
  382. public static function readyForResponses(){
  383. return \Illuminate\Foundation\Application::readyForResponses();
  384. }
  385. /**
  386. * Determine if the application is currently down for maintenance.
  387. *
  388. * @return bool
  389. * @static
  390. */
  391. public static function isDownForMaintenance(){
  392. return \Illuminate\Foundation\Application::isDownForMaintenance();
  393. }
  394. /**
  395. * Register a maintenance mode event listener.
  396. *
  397. * @param \Closure $callback
  398. * @return void
  399. * @static
  400. */
  401. public static function down($callback){
  402. \Illuminate\Foundation\Application::down($callback);
  403. }
  404. /**
  405. * Throw an HttpException with the given data.
  406. *
  407. * @param int $code
  408. * @param string $message
  409. * @param array $headers
  410. * @return void
  411. * @throws \Symfony\Component\HttpKernel\Exception\HttpException
  412. * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  413. * @static
  414. */
  415. public static function abort($code, $message = '', $headers = array()){
  416. \Illuminate\Foundation\Application::abort($code, $message, $headers);
  417. }
  418. /**
  419. * Register a 404 error handler.
  420. *
  421. * @param \Closure $callback
  422. * @return void
  423. * @static
  424. */
  425. public static function missing($callback){
  426. \Illuminate\Foundation\Application::missing($callback);
  427. }
  428. /**
  429. * Register an application error handler.
  430. *
  431. * @param \Closure $callback
  432. * @return void
  433. * @static
  434. */
  435. public static function error($callback){
  436. \Illuminate\Foundation\Application::error($callback);
  437. }
  438. /**
  439. * Register an error handler at the bottom of the stack.
  440. *
  441. * @param \Closure $callback
  442. * @return void
  443. * @static
  444. */
  445. public static function pushError($callback){
  446. \Illuminate\Foundation\Application::pushError($callback);
  447. }
  448. /**
  449. * Register an error handler for fatal errors.
  450. *
  451. * @param \Closure $callback
  452. * @return void
  453. * @static
  454. */
  455. public static function fatal($callback){
  456. \Illuminate\Foundation\Application::fatal($callback);
  457. }
  458. /**
  459. * Get the configuration loader instance.
  460. *
  461. * @return \Illuminate\Config\LoaderInterface
  462. * @static
  463. */
  464. public static function getConfigLoader(){
  465. return \Illuminate\Foundation\Application::getConfigLoader();
  466. }
  467. /**
  468. * Get the environment variables loader instance.
  469. *
  470. * @return \Illuminate\Config\EnvironmentVariablesLoaderInterface
  471. * @static
  472. */
  473. public static function getEnvironmentVariablesLoader(){
  474. return \Illuminate\Foundation\Application::getEnvironmentVariablesLoader();
  475. }
  476. /**
  477. * Get the service provider repository instance.
  478. *
  479. * @return \Illuminate\Foundation\ProviderRepository
  480. * @static
  481. */
  482. public static function getProviderRepository(){
  483. return \Illuminate\Foundation\Application::getProviderRepository();
  484. }
  485. /**
  486. * Get the service providers that have been loaded.
  487. *
  488. * @return array
  489. * @static
  490. */
  491. public static function getLoadedProviders(){
  492. return \Illuminate\Foundation\Application::getLoadedProviders();
  493. }
  494. /**
  495. * Set the application's deferred services.
  496. *
  497. * @param array $services
  498. * @return void
  499. * @static
  500. */
  501. public static function setDeferredServices($services){
  502. \Illuminate\Foundation\Application::setDeferredServices($services);
  503. }
  504. /**
  505. * Determine if the given service is a deferred service.
  506. *
  507. * @param string $service
  508. * @return bool
  509. * @static
  510. */
  511. public static function isDeferredService($service){
  512. return \Illuminate\Foundation\Application::isDeferredService($service);
  513. }
  514. /**
  515. * Get or set the request class for the application.
  516. *
  517. * @param string $class
  518. * @return string
  519. * @static
  520. */
  521. public static function requestClass($class = null){
  522. return \Illuminate\Foundation\Application::requestClass($class);
  523. }
  524. /**
  525. * Set the application request for the console environment.
  526. *
  527. * @return void
  528. * @static
  529. */
  530. public static function setRequestForConsoleEnvironment(){
  531. \Illuminate\Foundation\Application::setRequestForConsoleEnvironment();
  532. }
  533. /**
  534. * Call a method on the default request class.
  535. *
  536. * @param string $method
  537. * @param array $parameters
  538. * @return mixed
  539. * @static
  540. */
  541. public static function onRequest($method, $parameters = array()){
  542. return \Illuminate\Foundation\Application::onRequest($method, $parameters);
  543. }
  544. /**
  545. * Get the current application locale.
  546. *
  547. * @return string
  548. * @static
  549. */
  550. public static function getLocale(){
  551. return \Illuminate\Foundation\Application::getLocale();
  552. }
  553. /**
  554. * Set the current application locale.
  555. *
  556. * @param string $locale
  557. * @return void
  558. * @static
  559. */
  560. public static function setLocale($locale){
  561. \Illuminate\Foundation\Application::setLocale($locale);
  562. }
  563. /**
  564. * Register the core class aliases in the container.
  565. *
  566. * @return void
  567. * @static
  568. */
  569. public static function registerCoreContainerAliases(){
  570. \Illuminate\Foundation\Application::registerCoreContainerAliases();
  571. }
  572. /**
  573. * Determine if the given abstract type has been resolved.
  574. *
  575. * @param string $abstract
  576. * @return bool
  577. * @static
  578. */
  579. public static function resolved($abstract){
  580. //Method inherited from \Illuminate\Container\Container
  581. return \Illuminate\Foundation\Application::resolved($abstract);
  582. }
  583. /**
  584. * Determine if a given string is an alias.
  585. *
  586. * @param string $name
  587. * @return bool
  588. * @static
  589. */
  590. public static function isAlias($name){
  591. //Method inherited from \Illuminate\Container\Container
  592. return \Illuminate\Foundation\Application::isAlias($name);
  593. }
  594. /**
  595. * Register a binding with the container.
  596. *
  597. * @param string|array $abstract
  598. * @param \Closure|string|null $concrete
  599. * @param bool $shared
  600. * @return void
  601. * @static
  602. */
  603. public static function bind($abstract, $concrete = null, $shared = false){
  604. //Method inherited from \Illuminate\Container\Container
  605. \Illuminate\Foundation\Application::bind($abstract, $concrete, $shared);
  606. }
  607. /**
  608. * Register a binding if it hasn't already been registered.
  609. *
  610. * @param string $abstract
  611. * @param \Closure|string|null $concrete
  612. * @param bool $shared
  613. * @return void
  614. * @static
  615. */
  616. public static function bindIf($abstract, $concrete = null, $shared = false){
  617. //Method inherited from \Illuminate\Container\Container
  618. \Illuminate\Foundation\Application::bindIf($abstract, $concrete, $shared);
  619. }
  620. /**
  621. * Register a shared binding in the container.
  622. *
  623. * @param string $abstract
  624. * @param \Closure|string|null $concrete
  625. * @return void
  626. * @static
  627. */
  628. public static function singleton($abstract, $concrete = null){
  629. //Method inherited from \Illuminate\Container\Container
  630. \Illuminate\Foundation\Application::singleton($abstract, $concrete);
  631. }
  632. /**
  633. * Wrap a Closure such that it is shared.
  634. *
  635. * @param \Closure $closure
  636. * @return \Closure
  637. * @static
  638. */
  639. public static function share($closure){
  640. //Method inherited from \Illuminate\Container\Container
  641. return \Illuminate\Foundation\Application::share($closure);
  642. }
  643. /**
  644. * Bind a shared Closure into the container.
  645. *
  646. * @param string $abstract
  647. * @param \Closure $closure
  648. * @return void
  649. * @static
  650. */
  651. public static function bindShared($abstract, $closure){
  652. //Method inherited from \Illuminate\Container\Container
  653. \Illuminate\Foundation\Application::bindShared($abstract, $closure);
  654. }
  655. /**
  656. * Register an existing instance as shared in the container.
  657. *
  658. * @param string $abstract
  659. * @param mixed $instance
  660. * @return void
  661. * @static
  662. */
  663. public static function instance($abstract, $instance){
  664. //Method inherited from \Illuminate\Container\Container
  665. \Illuminate\Foundation\Application::instance($abstract, $instance);
  666. }
  667. /**
  668. * Alias a type to a shorter name.
  669. *
  670. * @param string $abstract
  671. * @param string $alias
  672. * @return void
  673. * @static
  674. */
  675. public static function alias($abstract, $alias){
  676. //Method inherited from \Illuminate\Container\Container
  677. \Illuminate\Foundation\Application::alias($abstract, $alias);
  678. }
  679. /**
  680. * Bind a new callback to an abstract's rebind event.
  681. *
  682. * @param string $abstract
  683. * @param \Closure $callback
  684. * @return mixed
  685. * @static
  686. */
  687. public static function rebinding($abstract, $callback){
  688. //Method inherited from \Illuminate\Container\Container
  689. return \Illuminate\Foundation\Application::rebinding($abstract, $callback);
  690. }
  691. /**
  692. * Refresh an instance on the given target and method.
  693. *
  694. * @param string $abstract
  695. * @param mixed $target
  696. * @param string $method
  697. * @return mixed
  698. * @static
  699. */
  700. public static function refresh($abstract, $target, $method){
  701. //Method inherited from \Illuminate\Container\Container
  702. return \Illuminate\Foundation\Application::refresh($abstract, $target, $method);
  703. }
  704. /**
  705. * Instantiate a concrete instance of the given type.
  706. *
  707. * @param string $concrete
  708. * @param array $parameters
  709. * @return mixed
  710. * @throws BindingResolutionException
  711. * @static
  712. */
  713. public static function build($concrete, $parameters = array()){
  714. //Method inherited from \Illuminate\Container\Container
  715. return \Illuminate\Foundation\Application::build($concrete, $parameters);
  716. }
  717. /**
  718. * Register a new resolving callback.
  719. *
  720. * @param string $abstract
  721. * @param \Closure $callback
  722. * @return void
  723. * @static
  724. */
  725. public static function resolving($abstract, $callback){
  726. //Method inherited from \Illuminate\Container\Container
  727. \Illuminate\Foundation\Application::resolving($abstract, $callback);
  728. }
  729. /**
  730. * Register a new resolving callback for all types.
  731. *
  732. * @param \Closure $callback
  733. * @return void
  734. * @static
  735. */
  736. public static function resolvingAny($callback){
  737. //Method inherited from \Illuminate\Container\Container
  738. \Illuminate\Foundation\Application::resolvingAny($callback);
  739. }
  740. /**
  741. * Determine if a given type is shared.
  742. *
  743. * @param string $abstract
  744. * @return bool
  745. * @static
  746. */
  747. public static function isShared($abstract){
  748. //Method inherited from \Illuminate\Container\Container
  749. return \Illuminate\Foundation\Application::isShared($abstract);
  750. }
  751. /**
  752. * Get the container's bindings.
  753. *
  754. * @return array
  755. * @static
  756. */
  757. public static function getBindings(){
  758. //Method inherited from \Illuminate\Container\Container
  759. return \Illuminate\Foundation\Application::getBindings();
  760. }
  761. /**
  762. * Remove a resolved instance from the instance cache.
  763. *
  764. * @param string $abstract
  765. * @return void
  766. * @static
  767. */
  768. public static function forgetInstance($abstract){
  769. //Method inherited from \Illuminate\Container\Container
  770. \Illuminate\Foundation\Application::forgetInstance($abstract);
  771. }
  772. /**
  773. * Clear all of the instances from the container.
  774. *
  775. * @return void
  776. * @static
  777. */
  778. public static function forgetInstances(){
  779. //Method inherited from \Illuminate\Container\Container
  780. \Illuminate\Foundation\Application::forgetInstances();
  781. }
  782. /**
  783. * Determine if a given offset exists.
  784. *
  785. * @param string $key
  786. * @return bool
  787. * @static
  788. */
  789. public static function offsetExists($key){
  790. //Method inherited from \Illuminate\Container\Container
  791. return \Illuminate\Foundation\Application::offsetExists($key);
  792. }
  793. /**
  794. * Get the value at a given offset.
  795. *
  796. * @param string $key
  797. * @return mixed
  798. * @static
  799. */
  800. public static function offsetGet($key){
  801. //Method inherited from \Illuminate\Container\Container
  802. return \Illuminate\Foundation\Application::offsetGet($key);
  803. }
  804. /**
  805. * Set the value at a given offset.
  806. *
  807. * @param string $key
  808. * @param mixed $value
  809. * @return void
  810. * @static
  811. */
  812. public static function offsetSet($key, $value){
  813. //Method inherited from \Illuminate\Container\Container
  814. \Illuminate\Foundation\Application::offsetSet($key, $value);
  815. }
  816. /**
  817. * Unset the value at a given offset.
  818. *
  819. * @param string $key
  820. * @return void
  821. * @static
  822. */
  823. public static function offsetUnset($key){
  824. //Method inherited from \Illuminate\Container\Container
  825. \Illuminate\Foundation\Application::offsetUnset($key);
  826. }
  827. }
  828. class Artisan extends \Illuminate\Support\Facades\Artisan{
  829. /**
  830. * Create and boot a new Console application.
  831. *
  832. * @param \Illuminate\Foundation\Application $app
  833. * @return \Illuminate\Console\Application
  834. * @static
  835. */
  836. public static function start($app){
  837. return \Illuminate\Console\Application::start($app);
  838. }
  839. /**
  840. * Create a new Console application.
  841. *
  842. * @param \Illuminate\Foundation\Application $app
  843. * @return \Illuminate\Console\Application
  844. * @static
  845. */
  846. public static function make($app){
  847. return \Illuminate\Console\Application::make($app);
  848. }
  849. /**
  850. * Boot the Console application.
  851. *
  852. * @return $this
  853. * @static
  854. */
  855. public static function boot(){
  856. return \Illuminate\Console\Application::boot();
  857. }
  858. /**
  859. * Run an Artisan console command by name.
  860. *
  861. * @param string $command
  862. * @param array $parameters
  863. * @param \Symfony\Component\Console\Output\OutputInterface $output
  864. * @return void
  865. * @static
  866. */
  867. public static function call($command, $parameters = array(), $output = null){
  868. \Illuminate\Console\Application::call($command, $parameters, $output);
  869. }
  870. /**
  871. * Add a command to the console.
  872. *
  873. * @param \Symfony\Component\Console\Command\Command $command
  874. * @return \Symfony\Component\Console\Command\Command
  875. * @static
  876. */
  877. public static function add($command){
  878. return \Illuminate\Console\Application::add($command);
  879. }
  880. /**
  881. * Add a command, resolving through the application.
  882. *
  883. * @param string $command
  884. * @return \Symfony\Component\Console\Command\Command
  885. * @static
  886. */
  887. public static function resolve($command){
  888. return \Illuminate\Console\Application::resolve($command);
  889. }
  890. /**
  891. * Resolve an array of commands through the application.
  892. *
  893. * @param array|mixed $commands
  894. * @return void
  895. * @static
  896. */
  897. public static function resolveCommands($commands){
  898. \Illuminate\Console\Application::resolveCommands($commands);
  899. }
  900. /**
  901. * Render the given exception.
  902. *
  903. * @param \Exception $e
  904. * @param \Symfony\Component\Console\Output\OutputInterface $output
  905. * @return void
  906. * @static
  907. */
  908. public static function renderException($e, $output){
  909. \Illuminate\Console\Application::renderException($e, $output);
  910. }
  911. /**
  912. * Set the exception handler instance.
  913. *
  914. * @param \Illuminate\Exception\Handler $handler
  915. * @return $this
  916. * @static
  917. */
  918. public static function setExceptionHandler($handler){
  919. return \Illuminate\Console\Application::setExceptionHandler($handler);
  920. }
  921. /**
  922. * Set the Laravel application instance.
  923. *
  924. * @param \Illuminate\Foundation\Application $laravel
  925. * @return $this
  926. * @static
  927. */
  928. public static function setLaravel($laravel){
  929. return \Illuminate\Console\Application::setLaravel($laravel);
  930. }
  931. /**
  932. * Set whether the Console app should auto-exit when done.
  933. *
  934. * @param bool $boolean
  935. * @return $this
  936. * @static
  937. */
  938. public static function setAutoExit($boolean){
  939. return \Illuminate\Console\Application::setAutoExit($boolean);
  940. }
  941. /**
  942. *
  943. *
  944. * @static
  945. */
  946. public static function setDispatcher($dispatcher){
  947. //Method inherited from \Symfony\Component\Console\Application
  948. return \Illuminate\Console\Application::setDispatcher($dispatcher);
  949. }
  950. /**
  951. * Runs the current application.
  952. *
  953. * @param \Symfony\Component\Console\InputInterface $input An Input instance
  954. * @param \Symfony\Component\Console\OutputInterface $output An Output instance
  955. * @return int 0 if everything went fine, or an error code
  956. * @throws \Exception When doRun returns Exception
  957. * @api
  958. * @static
  959. */
  960. public static function run($input = null, $output = null){
  961. //Method inherited from \Symfony\Component\Console\Application
  962. return \Illuminate\Console\Application::run($input, $output);
  963. }
  964. /**
  965. * Runs the current application.
  966. *
  967. * @param \Symfony\Component\Console\InputInterface $input An Input instance
  968. * @param \Symfony\Component\Console\OutputInterface $output An Output instance
  969. * @return int 0 if everything went fine, or an error code
  970. * @static
  971. */
  972. public static function doRun($input, $output){
  973. //Method inherited from \Symfony\Component\Console\Application
  974. return \Illuminate\Console\Application::doRun($input, $output);
  975. }
  976. /**
  977. * Set a helper set to be used with the command.
  978. *
  979. * @param \Symfony\Component\Console\HelperSet $helperSet The helper set
  980. * @api
  981. * @static
  982. */
  983. public static function setHelperSet($helperSet){
  984. //Method inherited from \Symfony\Component\Console\Application
  985. return \Illuminate\Console\Application::setHelperSet($helperSet);
  986. }
  987. /**
  988. * Get the helper set associated with the command.
  989. *
  990. * @return \Symfony\Component\Console\HelperSet The HelperSet instance associated with this command
  991. * @api
  992. * @static
  993. */
  994. public static function getHelperSet(){
  995. //Method inherited from \Symfony\Component\Console\Application
  996. return \Illuminate\Console\Application::getHelperSet();
  997. }
  998. /**
  999. * Set an input definition set to be used with this application.
  1000. *
  1001. * @param \Symfony\Component\Console\InputDefinition $definition The input definition
  1002. * @api
  1003. * @static
  1004. */
  1005. public static function setDefinition($definition){
  1006. //Method inherited from \Symfony\Component\Console\Application
  1007. return \Illuminate\Console\Application::setDefinition($definition);
  1008. }
  1009. /**
  1010. * Gets the InputDefinition related to this Application.
  1011. *
  1012. * @return \Symfony\Component\Console\InputDefinition The InputDefinition instance
  1013. * @static
  1014. */
  1015. public static function getDefinition(){
  1016. //Method inherited from \Symfony\Component\Console\Application
  1017. return \Illuminate\Console\Application::getDefinition();
  1018. }
  1019. /**
  1020. * Gets the help message.
  1021. *
  1022. * @return string A help message.
  1023. * @static
  1024. */
  1025. public static function getHelp(){
  1026. //Method inherited from \Symfony\Component\Console\Application
  1027. return \Illuminate\Console\Application::getHelp();
  1028. }
  1029. /**
  1030. * Sets whether to catch exceptions or not during commands execution.
  1031. *
  1032. * @param bool $boolean Whether to catch exceptions or not during commands execution
  1033. * @api
  1034. * @static
  1035. */
  1036. public static function setCatchExceptions($boolean){
  1037. //Method inherited from \Symfony\Component\Console\Application
  1038. return \Illuminate\Console\Application::setCatchExceptions($boolean);
  1039. }
  1040. /**
  1041. * Gets the name of the application.
  1042. *
  1043. * @return string The application name
  1044. * @api
  1045. * @static
  1046. */
  1047. public static function getName(){
  1048. //Method inherited from \Symfony\Component\Console\Application
  1049. return \Illuminate\Console\Application::getName();
  1050. }
  1051. /**
  1052. * Sets the application name.
  1053. *
  1054. * @param string $name The application name
  1055. * @api
  1056. * @static
  1057. */
  1058. public static function setName($name){
  1059. //Method inherited from \Symfony\Component\Console\Application
  1060. return \Illuminate\Console\Application::setName($name);
  1061. }
  1062. /**
  1063. * Gets the application version.
  1064. *
  1065. * @return string The application version
  1066. * @api
  1067. * @static
  1068. */
  1069. public static function getVersion(){
  1070. //Method inherited from \Symfony\Component\Console\Application
  1071. return \Illuminate\Console\Application::getVersion();
  1072. }
  1073. /**
  1074. * Sets the application version.
  1075. *
  1076. * @param string $version The application version
  1077. * @api
  1078. * @static
  1079. */
  1080. public static function setVersion($version){
  1081. //Method inherited from \Symfony\Component\Console\Application
  1082. return \Illuminate\Console\Application::setVersion($version);
  1083. }
  1084. /**
  1085. * Returns the long version of the application.
  1086. *
  1087. * @return string The long application version
  1088. * @api
  1089. * @static
  1090. */
  1091. public static function getLongVersion(){
  1092. //Method inherited from \Symfony\Component\Console\Application
  1093. return \Illuminate\Console\Application::getLongVersion();
  1094. }
  1095. /**
  1096. * Registers a new command.
  1097. *
  1098. * @param string $name The command name
  1099. * @return \Symfony\Component\Console\Command The newly created command
  1100. * @api
  1101. * @static
  1102. */
  1103. public static function register($name){
  1104. //Method inherited from \Symfony\Component\Console\Application
  1105. return \Illuminate\Console\Application::register($name);
  1106. }
  1107. /**
  1108. * Adds an array of command objects.
  1109. *
  1110. * @param \Symfony\Component\Console\Command[] $commands An array of commands
  1111. * @api
  1112. * @static
  1113. */
  1114. public static function addCommands($commands){
  1115. //Method inherited from \Symfony\Component\Console\Application
  1116. return \Illuminate\Console\Application::addCommands($commands);
  1117. }
  1118. /**
  1119. * Returns a registered command by name or alias.
  1120. *
  1121. * @param string $name The command name or alias
  1122. * @return \Symfony\Component\Console\Command A Command object
  1123. * @throws \InvalidArgumentException When command name given does not exist
  1124. * @api
  1125. * @static
  1126. */
  1127. public static function get($name){
  1128. //Method inherited from \Symfony\Component\Console\Application
  1129. return \Illuminate\Console\Application::get($name);
  1130. }
  1131. /**
  1132. * Returns true if the command exists, false otherwise.
  1133. *
  1134. * @param string $name The command name or alias
  1135. * @return bool true if the command exists, false otherwise
  1136. * @api
  1137. * @static
  1138. */
  1139. public static function has($name){
  1140. //Method inherited from \Symfony\Component\Console\Application
  1141. return \Illuminate\Console\Application::has($name);
  1142. }
  1143. /**
  1144. * Returns an array of all unique namespaces used by currently registered commands.
  1145. *
  1146. * It does not returns the global namespace which always exists.
  1147. *
  1148. * @return array An array of namespaces
  1149. * @static
  1150. */
  1151. public static function getNamespaces(){
  1152. //Method inherited from \Symfony\Component\Console\Application
  1153. return \Illuminate\Console\Application::getNamespaces();
  1154. }
  1155. /**
  1156. * Finds a registered namespace by a name or an abbreviation.
  1157. *
  1158. * @param string $namespace A namespace or abbreviation to search for
  1159. * @return string A registered namespace
  1160. * @throws \InvalidArgumentException When namespace is incorrect or ambiguous
  1161. * @static
  1162. */
  1163. public static function findNamespace($namespace){
  1164. //Method inherited from \Symfony\Component\Console\Application
  1165. return \Illuminate\Console\Application::findNamespace($namespace);
  1166. }
  1167. /**
  1168. * Finds a command by name or alias.
  1169. *
  1170. * Contrary to get, this command tries to find the best
  1171. * match if you give it an abbreviation of a name or alias.
  1172. *
  1173. * @param string $name A command name or a command alias
  1174. * @return \Symfony\Component\Console\Command A Command instance
  1175. * @throws \InvalidArgumentException When command name is incorrect or ambiguous
  1176. * @api
  1177. * @static
  1178. */
  1179. public static function find($name){
  1180. //Method inherited from \Symfony\Component\Console\Application
  1181. return \Illuminate\Console\Application::find($name);
  1182. }
  1183. /**
  1184. * Gets the commands (registered in the given namespace if provided).
  1185. *
  1186. * The array keys are the full names and the values the command instances.
  1187. *
  1188. * @param string $namespace A namespace name
  1189. * @return \Symfony\Component\Console\Command[] An array of Command instances
  1190. * @api
  1191. * @static
  1192. */
  1193. public static function all($namespace = null){
  1194. //Method inherited from \Symfony\Component\Console\Application
  1195. return \Illuminate\Console\Application::all($namespace);
  1196. }
  1197. /**
  1198. * Returns an array of possible abbreviations given a set of names.
  1199. *
  1200. * @param array $names An array of names
  1201. * @return array An array of abbreviations
  1202. * @static
  1203. */
  1204. public static function getAbbreviations($names){
  1205. //Method inherited from \Symfony\Component\Console\Application
  1206. return \Illuminate\Console\Application::getAbbreviations($names);
  1207. }
  1208. /**
  1209. * Returns a text representation of the Application.
  1210. *
  1211. * @param string $namespace An optional namespace name
  1212. * @param bool $raw Whether to return raw command list
  1213. * @return string A string representing the Application
  1214. * @deprecated Deprecated since version 2.3, to be removed in 3.0.
  1215. * @static
  1216. */
  1217. public static function asText($namespace = null, $raw = false){
  1218. //Method inherited from \Symfony\Component\Console\Application
  1219. return \Illuminate\Console\Application::asText($namespace, $raw);
  1220. }
  1221. /**
  1222. * Returns an XML representation of the Application.
  1223. *
  1224. * @param string $namespace An optional namespace name
  1225. * @param bool $asDom Whether to return a DOM or an XML string
  1226. * @return string|\DOMDocument An XML string representing the Application
  1227. * @deprecated Deprecated since version 2.3, to be removed in 3.0.
  1228. * @static
  1229. */
  1230. public static function asXml($namespace = null, $asDom = false){
  1231. //Method inherited from \Symfony\Component\Console\Application
  1232. return \Illuminate\Console\Application::asXml($namespace, $asDom);
  1233. }
  1234. /**
  1235. * Tries to figure out the terminal dimensions based on the current environment.
  1236. *
  1237. * @return array Array containing width and height
  1238. * @static
  1239. */
  1240. public static function getTerminalDimensions(){
  1241. //Method inherited from \Symfony\Component\Console\Application
  1242. return \Illuminate\Console\Application::getTerminalDimensions();
  1243. }
  1244. /**
  1245. * Sets terminal dimensions.
  1246. *
  1247. * Can be useful to force terminal dimensions for functional tests.
  1248. *
  1249. * @param int $width The width
  1250. * @param int $height The height
  1251. * @return \Symfony\Component\Console\Application The current application
  1252. * @static
  1253. */
  1254. public static function setTerminalDimensions($width, $height){
  1255. //Method inherited from \Symfony\Component\Console\Application
  1256. return \Illuminate\Console\Application::setTerminalDimensions($width, $height);
  1257. }
  1258. /**
  1259. * Returns the namespace part of the command name.
  1260. *
  1261. * This method is not part of public API and should not be used directly.
  1262. *
  1263. * @param string $name The full name of the command
  1264. * @param string $limit The maximum number of parts of the namespace
  1265. * @return string The namespace of the command
  1266. * @static
  1267. */
  1268. public static function extractNamespace($name, $limit = null){
  1269. //Method inherited from \Symfony\Component\Console\Application
  1270. return \Illuminate\Console\Application::extractNamespace($name, $limit);
  1271. }
  1272. /**
  1273. * Sets the default Command name.
  1274. *
  1275. * @param string $commandName The Command name
  1276. * @static
  1277. */
  1278. public static function setDefaultCommand($commandName){
  1279. //Method inherited from \Symfony\Component\Console\Application
  1280. return \Illuminate\Console\Application::setDefaultCommand($commandName);
  1281. }
  1282. }
  1283. class Auth extends \Illuminate\Support\Facades\Auth{
  1284. /**
  1285. * Create an instance of the database driver.
  1286. *
  1287. * @return \Illuminate\Auth\Guard
  1288. * @static
  1289. */
  1290. public static function createDatabaseDriver(){
  1291. return \Illuminate\Auth\AuthManager::createDatabaseDriver();
  1292. }
  1293. /**
  1294. * Create an instance of the Eloquent driver.
  1295. *
  1296. * @return \Illuminate\Auth\Guard
  1297. * @static
  1298. */
  1299. public static function createEloquentDriver(){
  1300. return \Illuminate\Auth\AuthManager::createEloquentDriver();
  1301. }
  1302. /**
  1303. * Get the default authentication driver name.
  1304. *
  1305. * @return string
  1306. * @static
  1307. */
  1308. public static function getDefaultDriver(){
  1309. return \Illuminate\Auth\AuthManager::getDefaultDriver();
  1310. }
  1311. /**
  1312. * Set the default authentication driver name.
  1313. *
  1314. * @param string $name
  1315. * @return void
  1316. * @static
  1317. */
  1318. public static function setDefaultDriver($name){
  1319. \Illuminate\Auth\AuthManager::setDefaultDriver($name);
  1320. }
  1321. /**
  1322. * Get a driver instance.
  1323. *
  1324. * @param string $driver
  1325. * @return mixed
  1326. * @static
  1327. */
  1328. public static function driver($driver = null){
  1329. //Method inherited from \Illuminate\Support\Manager
  1330. return \Illuminate\Auth\AuthManager::driver($driver);
  1331. }
  1332. /**
  1333. * Register a custom driver creator Closure.
  1334. *
  1335. * @param string $driver
  1336. * @param \Closure $callback
  1337. * @return $this
  1338. * @static
  1339. */
  1340. public static function extend($driver, $callback){
  1341. //Method inherited from \Illuminate\Support\Manager
  1342. return \Illuminate\Auth\AuthManager::extend($driver, $callback);
  1343. }
  1344. /**
  1345. * Get all of the created "drivers".
  1346. *
  1347. * @return array
  1348. * @static
  1349. */
  1350. public static function getDrivers(){
  1351. //Method inherited from \Illuminate\Support\Manager
  1352. return \Illuminate\Auth\AuthManager::getDrivers();
  1353. }
  1354. /**
  1355. * Determine if the current user is authenticated.
  1356. *
  1357. * @return bool
  1358. * @static
  1359. */
  1360. public static function check(){
  1361. return \Illuminate\Auth\Guard::check();
  1362. }
  1363. /**
  1364. * Determine if the current user is a guest.
  1365. *
  1366. * @return bool
  1367. * @static
  1368. */
  1369. public static function guest(){
  1370. return \Illuminate\Auth\Guard::guest();
  1371. }
  1372. /**
  1373. * Get the currently authenticated user.
  1374. *
  1375. * @return \User|null
  1376. * @static
  1377. */
  1378. public static function user(){
  1379. return \Illuminate\Auth\Guard::user();
  1380. }
  1381. /**
  1382. * Get the ID for the currently authenticated user.
  1383. *
  1384. * @return int|null
  1385. * @static
  1386. */
  1387. public static function id(){
  1388. return \Illuminate\Auth\Guard::id();
  1389. }
  1390. /**
  1391. * Log a user into the application without sessions or cookies.
  1392. *
  1393. * @param array $credentials
  1394. * @return bool
  1395. * @static
  1396. */
  1397. public static function once($credentials = array()){
  1398. return \Illuminate\Auth\Guard::once($credentials);
  1399. }
  1400. /**
  1401. * Validate a user's credentials.
  1402. *
  1403. * @param array $credentials
  1404. * @return bool
  1405. * @static
  1406. */
  1407. public static function validate($credentials = array()){
  1408. return \Illuminate\Auth\Guard::validate($credentials);
  1409. }
  1410. /**
  1411. * Attempt to authenticate using HTTP Basic Auth.
  1412. *
  1413. * @param string $field
  1414. * @param \Symfony\Component\HttpFoundation\Request $request
  1415. * @return \Symfony\Component\HttpFoundation\Response|null
  1416. * @static
  1417. */
  1418. public static function basic($field = 'email', $request = null){
  1419. return \Illuminate\Auth\Guard::basic($field, $request);
  1420. }
  1421. /**
  1422. * Perform a stateless HTTP Basic login attempt.
  1423. *
  1424. * @param string $field
  1425. * @param \Symfony\Component\HttpFoundation\Request $request
  1426. * @return \Symfony\Component\HttpFoundation\Response|null
  1427. * @static
  1428. */
  1429. public static function onceBasic($field = 'email', $request = null){
  1430. return \Illuminate\Auth\Guard::onceBasic($field, $request);
  1431. }
  1432. /**
  1433. * Attempt to authenticate a user using the given credentials.
  1434. *
  1435. * @param array $credentials
  1436. * @param bool $remember
  1437. * @param bool $login
  1438. * @return bool
  1439. * @static
  1440. */
  1441. public static function attempt($credentials = array(), $remember = false, $login = true){
  1442. return \Illuminate\Auth\Guard::attempt($credentials, $remember, $login);
  1443. }
  1444. /**
  1445. * Register an authentication attempt event listener.
  1446. *
  1447. * @param mixed $callback
  1448. * @return void
  1449. * @static
  1450. */
  1451. public static function attempting($callback){
  1452. \Illuminate\Auth\Guard::attempting($callback);
  1453. }
  1454. /**
  1455. * Log a user into the application.
  1456. *
  1457. * @param \Illuminate\Auth\UserInterface $user
  1458. * @param bool $remember
  1459. * @return void
  1460. * @static
  1461. */
  1462. public static function login($user, $remember = false){
  1463. \Illuminate\Auth\Guard::login($user, $remember);
  1464. }
  1465. /**
  1466. * Log the given user ID into the application.
  1467. *
  1468. * @param mixed $id
  1469. * @param bool $remember
  1470. * @return \User
  1471. * @static
  1472. */
  1473. public static function loginUsingId($id, $remember = false){
  1474. return \Illuminate\Auth\Guard::loginUsingId($id, $remember);
  1475. }
  1476. /**
  1477. * Log the given user ID into the application without sessions or cookies.
  1478. *
  1479. * @param mixed $id
  1480. * @return bool
  1481. * @static
  1482. */
  1483. public static function onceUsingId($id){
  1484. return \Illuminate\Auth\Guard::onceUsingId($id);
  1485. }
  1486. /**
  1487. * Log the user out of the application.
  1488. *
  1489. * @return void
  1490. * @static
  1491. */
  1492. public static function logout(){
  1493. \Illuminate\Auth\Guard::logout();
  1494. }
  1495. /**
  1496. * Get the cookie creator instance used by the guard.
  1497. *
  1498. * @return \Illuminate\Cookie\CookieJar
  1499. * @throws \RuntimeException
  1500. * @static
  1501. */
  1502. public static function getCookieJar(){
  1503. return \Illuminate\Auth\Guard::getCookieJar();
  1504. }
  1505. /**
  1506. * Set the cookie creator instance used by the guard.
  1507. *
  1508. * @param \Illuminate\Cookie\CookieJar $cookie
  1509. * @return void
  1510. * @static
  1511. */
  1512. public static function setCookieJar($cookie){
  1513. \Illuminate\Auth\Guard::setCookieJar($cookie);
  1514. }
  1515. /**
  1516. * Get the event dispatcher instance.
  1517. *
  1518. * @return \Illuminate\Events\Dispatcher
  1519. * @static
  1520. */
  1521. public static function getDispatcher(){
  1522. return \Illuminate\Auth\Guard::getDispatcher();
  1523. }
  1524. /**
  1525. * Set the event dispatcher instance.
  1526. *
  1527. * @param \Illuminate\Events\Dispatcher
  1528. * @return void
  1529. * @static
  1530. */
  1531. public static function setDispatcher($events){
  1532. \Illuminate\Auth\Guard::setDispatcher($events);
  1533. }
  1534. /**
  1535. * Get the session store used by the guard.
  1536. *
  1537. * @return \Illuminate\Session\Store
  1538. * @static
  1539. */
  1540. public static function getSession(){
  1541. return \Illuminate\Auth\Guard::getSession();
  1542. }
  1543. /**
  1544. * Get the user provider used by the guard.
  1545. *
  1546. * @return \Illuminate\Auth\Guard
  1547. * @static
  1548. */
  1549. public static function getProvider(){
  1550. return \Illuminate\Auth\Guard::getProvider();
  1551. }
  1552. /**
  1553. * Set the user provider used by the guard.
  1554. *
  1555. * @param \Illuminate\Auth\UserProviderInterface $provider
  1556. * @return void
  1557. * @static
  1558. */
  1559. public static function setProvider($provider){
  1560. \Illuminate\Auth\Guard::setProvider($provider);
  1561. }
  1562. /**
  1563. * Return the currently cached user of the application.
  1564. *
  1565. * @return \User|null
  1566. * @static
  1567. */
  1568. public static function getUser(){
  1569. return \Illuminate\Auth\Guard::getUser();
  1570. }
  1571. /**
  1572. * Set the current user of the application.
  1573. *
  1574. * @param \Illuminate\Auth\UserInterface $user
  1575. * @return void
  1576. * @static
  1577. */
  1578. public static function setUser($user){
  1579. \Illuminate\Auth\Guard::setUser($user);
  1580. }
  1581. /**
  1582. * Get the current request instance.
  1583. *
  1584. * @return \Symfony\Component\HttpFoundation\Request
  1585. * @static
  1586. */
  1587. public static function getRequest(){
  1588. return \Illuminate\Auth\Guard::getRequest();
  1589. }
  1590. /**
  1591. * Set the current request instance.
  1592. *
  1593. * @param \Symfony\Component\HttpFoundation\Request
  1594. * @return $this
  1595. * @static
  1596. */
  1597. public static function setRequest($request){
  1598. return \Illuminate\Auth\Guard::setRequest($request);
  1599. }
  1600. /**
  1601. * Get the last user we attempted to authenticate.
  1602. *
  1603. * @return \User
  1604. * @static
  1605. */
  1606. public static function getLastAttempted(){
  1607. return \Illuminate\Auth\Guard::getLastAttempted();
  1608. }
  1609. /**
  1610. * Get a unique identifier for the auth session value.
  1611. *
  1612. * @return string
  1613. * @static
  1614. */
  1615. public static function getName(){
  1616. return \Illuminate\Auth\Guard::getName();
  1617. }
  1618. /**
  1619. * Get the name of the cookie used to store the "recaller".
  1620. *
  1621. * @return string
  1622. * @static
  1623. */
  1624. public static function getRecallerName(){
  1625. return \Illuminate\Auth\Guard::getRecallerName();
  1626. }
  1627. /**
  1628. * Determine if the user was authenticated via "remember me" cookie.
  1629. *
  1630. * @return bool
  1631. * @static
  1632. */
  1633. public static function viaRemember(){
  1634. return \Illuminate\Auth\Guard::viaRemember();
  1635. }
  1636. }
  1637. class Blade extends \Illuminate\Support\Facades\Blade{
  1638. /**
  1639. * Compile the view at the given path.
  1640. *
  1641. * @param string $path
  1642. * @return void
  1643. * @static
  1644. */
  1645. public static function compile($path = null){
  1646. \Illuminate\View\Compilers\BladeCompiler::compile($path);
  1647. }
  1648. /**
  1649. * Get the path currently being compiled.
  1650. *
  1651. * @return string
  1652. * @static
  1653. */
  1654. public static function getPath(){
  1655. return \Illuminate\View\Compilers\BladeCompiler::getPath();
  1656. }
  1657. /**
  1658. * Set the path currently being compiled.
  1659. *
  1660. * @param string $path
  1661. * @return void
  1662. * @static
  1663. */
  1664. public static function setPath($path){
  1665. \Illuminate\View\Compilers\BladeCompiler::setPath($path);
  1666. }
  1667. /**
  1668. * Compile the given Blade template contents.
  1669. *
  1670. * @param string $value
  1671. * @return string
  1672. * @static
  1673. */
  1674. public static function compileString($value){
  1675. return \Illuminate\View\Compilers\BladeCompiler::compileString($value);
  1676. }
  1677. /**
  1678. * Compile the default values for the echo statement.
  1679. *
  1680. * @param string $value
  1681. * @return string
  1682. * @static
  1683. */
  1684. public static function compileEchoDefaults($value){
  1685. return \Illuminate\View\Compilers\BladeCompiler::compileEchoDefaults($value);
  1686. }
  1687. /**
  1688. * Register a custom Blade compiler.
  1689. *
  1690. * @param \Closure $compiler
  1691. * @return void
  1692. * @static
  1693. */
  1694. public static function extend($compiler){
  1695. \Illuminate\View\Compilers\BladeCompiler::extend($compiler);
  1696. }
  1697. /**
  1698. * Get the regular expression for a generic Blade function.
  1699. *
  1700. * @param string $function
  1701. * @return string
  1702. * @static
  1703. */
  1704. public static function createMatcher($function){
  1705. return \Illuminate\View\Compilers\BladeCompiler::createMatcher($function);
  1706. }
  1707. /**
  1708. * Get the regular expression for a generic Blade function.
  1709. *
  1710. * @param string $function
  1711. * @return string
  1712. * @static
  1713. */
  1714. public static function createOpenMatcher($function){
  1715. return \Illuminate\View\Compilers\BladeCompiler::createOpenMatcher($function);
  1716. }
  1717. /**
  1718. * Create a plain Blade matcher.
  1719. *
  1720. * @param string $function
  1721. * @return string
  1722. * @static
  1723. */
  1724. public static function createPlainMatcher($function){
  1725. return \Illuminate\View\Compilers\BladeCompiler::createPlainMatcher($function);
  1726. }
  1727. /**
  1728. * Sets the content tags used for the compiler.
  1729. *
  1730. * @param string $openTag
  1731. * @param string $closeTag
  1732. * @param bool $escaped
  1733. * @return void
  1734. * @static
  1735. */
  1736. public static function setContentTags($openTag, $closeTag, $escaped = false){
  1737. \Illuminate\View\Compilers\BladeCompiler::setContentTags($openTag, $closeTag, $escaped);
  1738. }
  1739. /**
  1740. * Sets the escaped content tags used for the compiler.
  1741. *
  1742. * @param string $openTag
  1743. * @param string $closeTag
  1744. * @return void
  1745. * @static
  1746. */
  1747. public static function setEscapedContentTags($openTag, $closeTag){
  1748. \Illuminate\View\Compilers\BladeCompiler::setEscapedContentTags($openTag, $closeTag);
  1749. }
  1750. /**
  1751. * Gets the content tags used for the compiler.
  1752. *
  1753. * @return string
  1754. * @static
  1755. */
  1756. public static function getContentTags(){
  1757. return \Illuminate\View\Compilers\BladeCompiler::getContentTags();
  1758. }
  1759. /**
  1760. * Gets the escaped content tags used for the compiler.
  1761. *
  1762. * @return string
  1763. * @static
  1764. */
  1765. public static function getEscapedContentTags(){
  1766. return \Illuminate\View\Compilers\BladeCompiler::getEscapedContentTags();
  1767. }
  1768. /**
  1769. * Get the path to the compiled version of a view.
  1770. *
  1771. * @param string $path
  1772. * @return string
  1773. * @static
  1774. */
  1775. public static function getCompiledPath($path){
  1776. //Method inherited from \Illuminate\View\Compilers\Compiler
  1777. return \Illuminate\View\Compilers\BladeCompiler::getCompiledPath($path);
  1778. }
  1779. /**
  1780. * Determine if the view at the given path is expired.
  1781. *
  1782. * @param string $path
  1783. * @return bool
  1784. * @static
  1785. */
  1786. public static function isExpired($path){
  1787. //Method inherited from \Illuminate\View\Compilers\Compiler
  1788. return \Illuminate\View\Compilers\BladeCompiler::isExpired($path);
  1789. }
  1790. }
  1791. class Cache extends \Illuminate\Support\Facades\Cache{
  1792. /**
  1793. * Get the cache "prefix" value.
  1794. *
  1795. * @return string
  1796. * @static
  1797. */
  1798. public static function getPrefix(){
  1799. return \Illuminate\Cache\CacheManager::getPrefix();
  1800. }
  1801. /**
  1802. * Set the cache "prefix" value.
  1803. *
  1804. * @param string $name
  1805. * @return void
  1806. * @static
  1807. */
  1808. public static function setPrefix($name){
  1809. \Illuminate\Cache\CacheManager::setPrefix($name);
  1810. }
  1811. /**
  1812. * Get the default cache driver name.
  1813. *
  1814. * @return string
  1815. * @static
  1816. */
  1817. public static function getDefaultDriver(){
  1818. return \Illuminate\Cache\CacheManager::getDefaultDriver();
  1819. }
  1820. /**
  1821. * Set the default cache driver name.
  1822. *
  1823. * @param string $name
  1824. * @return void
  1825. * @static
  1826. */
  1827. public static function setDefaultDriver($name){
  1828. \Illuminate\Cache\CacheManager::setDefaultDriver($name);
  1829. }
  1830. /**
  1831. * Get a driver instance.
  1832. *
  1833. * @param string $driver
  1834. * @return mixed
  1835. * @static
  1836. */
  1837. public static function driver($driver = null){
  1838. //Method inherited from \Illuminate\Support\Manager
  1839. return \Illuminate\Cache\CacheManager::driver($driver);
  1840. }
  1841. /**
  1842. * Register a custom driver creator Closure.
  1843. *
  1844. * @param string $driver
  1845. * @param \Closure $callback
  1846. * @return $this
  1847. * @static
  1848. */
  1849. public static function extend($driver, $callback){
  1850. //Method inherited from \Illuminate\Support\Manager
  1851. return \Illuminate\Cache\CacheManager::extend($driver, $callback);
  1852. }
  1853. /**
  1854. * Get all of the created "drivers".
  1855. *
  1856. * @return array
  1857. * @static
  1858. */
  1859. public static function getDrivers(){
  1860. //Method inherited from \Illuminate\Support\Manager
  1861. return \Illuminate\Cache\CacheManager::getDrivers();
  1862. }
  1863. /**
  1864. * Determine if an item exists in the cache.
  1865. *
  1866. * @param string $key
  1867. * @return bool
  1868. * @static
  1869. */
  1870. public static function has($key){
  1871. return \Illuminate\Cache\Repository::has($key);
  1872. }
  1873. /**
  1874. * Retrieve an item from the cache by key.
  1875. *
  1876. * @param string $key
  1877. * @param mixed $default
  1878. * @return mixed
  1879. * @static
  1880. */
  1881. public static function get($key, $default = null){
  1882. return \Illuminate\Cache\Repository::get($key, $default);
  1883. }
  1884. /**
  1885. * Retrieve an item from the cache and delete it.
  1886. *
  1887. * @param string $key
  1888. * @param mixed $default
  1889. * @return mixed
  1890. * @static
  1891. */
  1892. public static function pull($key, $default = null){
  1893. return \Illuminate\Cache\Repository::pull($key, $default);
  1894. }
  1895. /**
  1896. * Store an item in the cache.
  1897. *
  1898. * @param string $key
  1899. * @param mixed $value
  1900. * @param \DateTime|int $minutes
  1901. * @return void
  1902. * @static
  1903. */
  1904. public static function put($key, $value, $minutes){
  1905. \Illuminate\Cache\Repository::put($key, $value, $minutes);
  1906. }
  1907. /**
  1908. * Store an item in the cache if the key does not exist.
  1909. *
  1910. * @param string $key
  1911. * @param mixed $value
  1912. * @param \DateTime|int $minutes
  1913. * @return bool
  1914. * @static
  1915. */
  1916. public static function add($key, $value, $minutes){
  1917. return \Illuminate\Cache\Repository::add($key, $value, $minutes);
  1918. }
  1919. /**
  1920. * Get an item from the cache, or store the default value.
  1921. *
  1922. * @param string $key
  1923. * @param \DateTime|int $minutes
  1924. * @param \Closure $callback
  1925. * @return mixed
  1926. * @static
  1927. */
  1928. public static function remember($key, $minutes, $callback){
  1929. return \Illuminate\Cache\Repository::remember($key, $minutes, $callback);
  1930. }
  1931. /**
  1932. * Get an item from the cache, or store the default value forever.
  1933. *
  1934. * @param string $key
  1935. * @param \Closure $callback
  1936. * @return mixed
  1937. * @static
  1938. */
  1939. public static function sear($key, $callback){
  1940. return \Illuminate\Cache\Repository::sear($key, $callback);
  1941. }
  1942. /**
  1943. * Get an item from the cache, or store the default value forever.
  1944. *
  1945. * @param string $key
  1946. * @param \Closure $callback
  1947. * @return mixed
  1948. * @static
  1949. */
  1950. public static function rememberForever($key, $callback){
  1951. return \Illuminate\Cache\Repository::rememberForever($key, $callback);
  1952. }
  1953. /**
  1954. * Get the default cache time.
  1955. *
  1956. * @return int
  1957. * @static
  1958. */
  1959. public static function getDefaultCacheTime(){
  1960. return \Illuminate\Cache\Repository::getDefaultCacheTime();
  1961. }
  1962. /**
  1963. * Set the default cache time in minutes.
  1964. *
  1965. * @param int $minutes
  1966. * @return void
  1967. * @static
  1968. */
  1969. public static function setDefaultCacheTime($minutes){
  1970. \Illuminate\Cache\Repository::setDefaultCacheTime($minutes);
  1971. }
  1972. /**
  1973. * Get the cache store implementation.
  1974. *
  1975. * @return \Illuminate\Cache\FileStore
  1976. * @static
  1977. */
  1978. public static function getStore(){
  1979. return \Illuminate\Cache\Repository::getStore();
  1980. }
  1981. /**
  1982. * Determine if a cached value exists.
  1983. *
  1984. * @param string $key
  1985. * @return bool
  1986. * @static
  1987. */
  1988. public static function offsetExists($key){
  1989. return \Illuminate\Cache\Repository::offsetExists($key);
  1990. }
  1991. /**
  1992. * Retrieve an item from the cache by key.
  1993. *
  1994. * @param string $key
  1995. * @return mixed
  1996. * @static
  1997. */
  1998. public static function offsetGet($key){
  1999. return \Illuminate\Cache\Repository::offsetGet($key);
  2000. }
  2001. /**
  2002. * Store an item in the cache for the default time.
  2003. *
  2004. * @param string $key
  2005. * @param mixed $value
  2006. * @return void
  2007. * @static
  2008. */
  2009. public static function offsetSet($key, $value){
  2010. \Illuminate\Cache\Repository::offsetSet($key, $value);
  2011. }
  2012. /**
  2013. * Remove an item from the cache.
  2014. *
  2015. * @param string $key
  2016. * @return void
  2017. * @static
  2018. */
  2019. public static function offsetUnset($key){
  2020. \Illuminate\Cache\Repository::offsetUnset($key);
  2021. }
  2022. /**
  2023. * Register a custom macro.
  2024. *
  2025. * @param string $name
  2026. * @param callable $macro
  2027. * @return void
  2028. * @static
  2029. */
  2030. public static function macro($name, $macro){
  2031. \Illuminate\Cache\Repository::macro($name, $macro);
  2032. }
  2033. /**
  2034. * Checks if macro is registered
  2035. *
  2036. * @param string $name
  2037. * @return boolean
  2038. * @static
  2039. */
  2040. public static function hasMacro($name){
  2041. return \Illuminate\Cache\Repository::hasMacro($name);
  2042. }
  2043. /**
  2044. * Dynamically handle calls to the class.
  2045. *
  2046. * @param string $method
  2047. * @param array $parameters
  2048. * @return mixed
  2049. * @throws \BadMethodCallException
  2050. * @static
  2051. */
  2052. public static function macroCall($method, $parameters){
  2053. return \Illuminate\Cache\Repository::macroCall($method, $parameters);
  2054. }
  2055. /**
  2056. * Increment the value of an item in the cache.
  2057. *
  2058. * @param string $key
  2059. * @param mixed $value
  2060. * @return int
  2061. * @static
  2062. */
  2063. public static function increment($key, $value = 1){
  2064. return \Illuminate\Cache\FileStore::increment($key, $value);
  2065. }
  2066. /**
  2067. * Decrement the value of an item in the cache.
  2068. *
  2069. * @param string $key
  2070. * @param mixed $value
  2071. * @return int
  2072. * @static
  2073. */
  2074. public static function decrement($key, $value = 1){
  2075. return \Illuminate\Cache\FileStore::decrement($key, $value);
  2076. }
  2077. /**
  2078. * Store an item in the cache indefinitely.
  2079. *
  2080. * @param string $key
  2081. * @param mixed $value
  2082. * @return void
  2083. * @static
  2084. */
  2085. public static function forever($key, $value){
  2086. \Illuminate\Cache\FileStore::forever($key, $value);
  2087. }
  2088. /**
  2089. * Remove an item from the cache.
  2090. *
  2091. * @param string $key
  2092. * @return void
  2093. * @static
  2094. */
  2095. public static function forget($key){
  2096. \Illuminate\Cache\FileStore::forget($key);
  2097. }
  2098. /**
  2099. * Remove all items from the cache.
  2100. *
  2101. * @return void
  2102. * @static
  2103. */
  2104. public static function flush(){
  2105. \Illuminate\Cache\FileStore::flush();
  2106. }
  2107. /**
  2108. * Get the Filesystem instance.
  2109. *
  2110. * @return \Illuminate\Filesystem\Filesystem
  2111. * @static
  2112. */
  2113. public static function getFilesystem(){
  2114. return \Illuminate\Cache\FileStore::getFilesystem();
  2115. }
  2116. /**
  2117. * Get the working directory of the cache.
  2118. *
  2119. * @return string
  2120. * @static
  2121. */
  2122. public static function getDirectory(){
  2123. return \Illuminate\Cache\FileStore::getDirectory();
  2124. }
  2125. }
  2126. class ClassLoader extends \Illuminate\Support\ClassLoader{
  2127. }
  2128. class Config extends \Illuminate\Support\Facades\Config{
  2129. /**
  2130. * Determine if the given configuration value exists.
  2131. *
  2132. * @param string $key
  2133. * @return bool
  2134. * @static
  2135. */
  2136. public static function has($key){
  2137. return \Illuminate\Config\Repository::has($key);
  2138. }
  2139. /**
  2140. * Determine if a configuration group exists.
  2141. *
  2142. * @param string $key
  2143. * @return bool
  2144. * @static
  2145. */
  2146. public static function hasGroup($key){
  2147. return \Illuminate\Config\Repository::hasGroup($key);
  2148. }
  2149. /**
  2150. * Get the specified configuration value.
  2151. *
  2152. * @param string $key
  2153. * @param mixed $default
  2154. * @return mixed
  2155. * @static
  2156. */
  2157. public static function get($key, $default = null){
  2158. return \Illuminate\Config\Repository::get($key, $default);
  2159. }
  2160. /**
  2161. * Set a given configuration value.
  2162. *
  2163. * @param string $key
  2164. * @param mixed $value
  2165. * @return void
  2166. * @static
  2167. */
  2168. public static function set($key, $value){
  2169. \Illuminate\Config\Repository::set($key, $value);
  2170. }
  2171. /**
  2172. * Register a package for cascading configuration.
  2173. *
  2174. * @param string $package
  2175. * @param string $hint
  2176. * @param string $namespace
  2177. * @return void
  2178. * @static
  2179. */
  2180. public static function package($package, $hint, $namespace = null){
  2181. \Illuminate\Config\Repository::package($package, $hint, $namespace);
  2182. }
  2183. /**
  2184. * Register an after load callback for a given namespace.
  2185. *
  2186. * @param string $namespace
  2187. * @param \Closure $callback
  2188. * @return void
  2189. * @static
  2190. */
  2191. public static function afterLoading($namespace, $callback){
  2192. \Illuminate\Config\Repository::afterLoading($namespace, $callback);
  2193. }
  2194. /**
  2195. * Add a new namespace to the loader.
  2196. *
  2197. * @param string $namespace
  2198. * @param string $hint
  2199. * @return void
  2200. * @static
  2201. */
  2202. public static function addNamespace($namespace, $hint){
  2203. \Illuminate\Config\Repository::addNamespace($namespace, $hint);
  2204. }
  2205. /**
  2206. * Returns all registered namespaces with the config
  2207. * loader.
  2208. *
  2209. * @return array
  2210. * @static
  2211. */
  2212. public static function getNamespaces(){
  2213. return \Illuminate\Config\Repository::getNamespaces();
  2214. }
  2215. /**
  2216. * Get the loader implementation.
  2217. *
  2218. * @return \Illuminate\Config\LoaderInterface
  2219. * @static
  2220. */
  2221. public static function getLoader(){
  2222. return \Illuminate\Config\Repository::getLoader();
  2223. }
  2224. /**
  2225. * Set the loader implementation.
  2226. *
  2227. * @param \Illuminate\Config\LoaderInterface $loader
  2228. * @return void
  2229. * @static
  2230. */
  2231. public static function setLoader($loader){
  2232. \Illuminate\Config\Repository::setLoader($loader);
  2233. }
  2234. /**
  2235. * Get the current configuration environment.
  2236. *
  2237. * @return string
  2238. * @static
  2239. */
  2240. public static function getEnvironment(){
  2241. return \Illuminate\Config\Repository::getEnvironment();
  2242. }
  2243. /**
  2244. * Get the after load callback array.
  2245. *
  2246. * @return array
  2247. * @static
  2248. */
  2249. public static function getAfterLoadCallbacks(){
  2250. return \Illuminate\Config\Repository::getAfterLoadCallbacks();
  2251. }
  2252. /**
  2253. * Get all of the configuration items.
  2254. *
  2255. * @return array
  2256. * @static
  2257. */
  2258. public static function getItems(){
  2259. return \Illuminate\Config\Repository::getItems();
  2260. }
  2261. /**
  2262. * Determine if the given configuration option exists.
  2263. *
  2264. * @param string $key
  2265. * @return bool
  2266. * @static
  2267. */
  2268. public static function offsetExists($key){
  2269. return \Illuminate\Config\Repository::offsetExists($key);
  2270. }
  2271. /**
  2272. * Get a configuration option.
  2273. *
  2274. * @param string $key
  2275. * @return mixed
  2276. * @static
  2277. */
  2278. public static function offsetGet($key){
  2279. return \Illuminate\Config\Repository::offsetGet($key);
  2280. }
  2281. /**
  2282. * Set a configuration option.
  2283. *
  2284. * @param string $key
  2285. * @param mixed $value
  2286. * @return void
  2287. * @static
  2288. */
  2289. public static function offsetSet($key, $value){
  2290. \Illuminate\Config\Repository::offsetSet($key, $value);
  2291. }
  2292. /**
  2293. * Unset a configuration option.
  2294. *
  2295. * @param string $key
  2296. * @return void
  2297. * @static
  2298. */
  2299. public static function offsetUnset($key){
  2300. \Illuminate\Config\Repository::offsetUnset($key);
  2301. }
  2302. /**
  2303. * Parse a key into namespace, group, and item.
  2304. *
  2305. * @param string $key
  2306. * @return array
  2307. * @static
  2308. */
  2309. public static function parseKey($key){
  2310. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  2311. return \Illuminate\Config\Repository::parseKey($key);
  2312. }
  2313. /**
  2314. * Set the parsed value of a key.
  2315. *
  2316. * @param string $key
  2317. * @param array $parsed
  2318. * @return void
  2319. * @static
  2320. */
  2321. public static function setParsedKey($key, $parsed){
  2322. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  2323. \Illuminate\Config\Repository::setParsedKey($key, $parsed);
  2324. }
  2325. }
  2326. class Controller extends \Illuminate\Routing\Controller{
  2327. }
  2328. class Cookie extends \Illuminate\Support\Facades\Cookie{
  2329. /**
  2330. * Create a new cookie instance.
  2331. *
  2332. * @param string $name
  2333. * @param string $value
  2334. * @param int $minutes
  2335. * @param string $path
  2336. * @param string $domain
  2337. * @param bool $secure
  2338. * @param bool $httpOnly
  2339. * @return \Symfony\Component\HttpFoundation\Cookie
  2340. * @static
  2341. */
  2342. public static function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true){
  2343. return \Illuminate\Cookie\CookieJar::make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
  2344. }
  2345. /**
  2346. * Create a cookie that lasts "forever" (five years).
  2347. *
  2348. * @param string $name
  2349. * @param string $value
  2350. * @param string $path
  2351. * @param string $domain
  2352. * @param bool $secure
  2353. * @param bool $httpOnly
  2354. * @return \Symfony\Component\HttpFoundation\Cookie
  2355. * @static
  2356. */
  2357. public static function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true){
  2358. return \Illuminate\Cookie\CookieJar::forever($name, $value, $path, $domain, $secure, $httpOnly);
  2359. }
  2360. /**
  2361. * Expire the given cookie.
  2362. *
  2363. * @param string $name
  2364. * @param string $path
  2365. * @param string $domain
  2366. * @return \Symfony\Component\HttpFoundation\Cookie
  2367. * @static
  2368. */
  2369. public static function forget($name, $path = null, $domain = null){
  2370. return \Illuminate\Cookie\CookieJar::forget($name, $path, $domain);
  2371. }
  2372. /**
  2373. * Determine if a cookie has been queued.
  2374. *
  2375. * @param string $key
  2376. * @return bool
  2377. * @static
  2378. */
  2379. public static function hasQueued($key){
  2380. return \Illuminate\Cookie\CookieJar::hasQueued($key);
  2381. }
  2382. /**
  2383. * Get a queued cookie instance.
  2384. *
  2385. * @param string $key
  2386. * @param mixed $default
  2387. * @return \Symfony\Component\HttpFoundation\Cookie
  2388. * @static
  2389. */
  2390. public static function queued($key, $default = null){
  2391. return \Illuminate\Cookie\CookieJar::queued($key, $default);
  2392. }
  2393. /**
  2394. * Queue a cookie to send with the next response.
  2395. *
  2396. * @param mixed
  2397. * @return void
  2398. * @static
  2399. */
  2400. public static function queue(){
  2401. \Illuminate\Cookie\CookieJar::queue();
  2402. }
  2403. /**
  2404. * Remove a cookie from the queue.
  2405. *
  2406. * @param string $name
  2407. * @static
  2408. */
  2409. public static function unqueue($name){
  2410. return \Illuminate\Cookie\CookieJar::unqueue($name);
  2411. }
  2412. /**
  2413. * Set the default path and domain for the jar.
  2414. *
  2415. * @param string $path
  2416. * @param string $domain
  2417. * @return $this
  2418. * @static
  2419. */
  2420. public static function setDefaultPathAndDomain($path, $domain){
  2421. return \Illuminate\Cookie\CookieJar::setDefaultPathAndDomain($path, $domain);
  2422. }
  2423. /**
  2424. * Get the cookies which have been queued for the next request
  2425. *
  2426. * @return array
  2427. * @static
  2428. */
  2429. public static function getQueuedCookies(){
  2430. return \Illuminate\Cookie\CookieJar::getQueuedCookies();
  2431. }
  2432. }
  2433. class Crypt extends \Illuminate\Support\Facades\Crypt{
  2434. /**
  2435. * Encrypt the given value.
  2436. *
  2437. * @param string $value
  2438. * @return string
  2439. * @static
  2440. */
  2441. public static function encrypt($value){
  2442. return \Illuminate\Encryption\Encrypter::encrypt($value);
  2443. }
  2444. /**
  2445. * Decrypt the given value.
  2446. *
  2447. * @param string $payload
  2448. * @return string
  2449. * @static
  2450. */
  2451. public static function decrypt($payload){
  2452. return \Illuminate\Encryption\Encrypter::decrypt($payload);
  2453. }
  2454. /**
  2455. * Set the encryption key.
  2456. *
  2457. * @param string $key
  2458. * @return void
  2459. * @static
  2460. */
  2461. public static function setKey($key){
  2462. \Illuminate\Encryption\Encrypter::setKey($key);
  2463. }
  2464. /**
  2465. * Set the encryption cipher.
  2466. *
  2467. * @param string $cipher
  2468. * @return void
  2469. * @static
  2470. */
  2471. public static function setCipher($cipher){
  2472. \Illuminate\Encryption\Encrypter::setCipher($cipher);
  2473. }
  2474. /**
  2475. * Set the encryption mode.
  2476. *
  2477. * @param string $mode
  2478. * @return void
  2479. * @static
  2480. */
  2481. public static function setMode($mode){
  2482. \Illuminate\Encryption\Encrypter::setMode($mode);
  2483. }
  2484. }
  2485. class DB extends \Illuminate\Support\Facades\DB{
  2486. /**
  2487. * Get a database connection instance.
  2488. *
  2489. * @param string $name
  2490. * @return \Illuminate\Database\Connection
  2491. * @static
  2492. */
  2493. public static function connection($name = null){
  2494. return \Illuminate\Database\DatabaseManager::connection($name);
  2495. }
  2496. /**
  2497. * Disconnect from the given database and remove from local cache.
  2498. *
  2499. * @param string $name
  2500. * @return void
  2501. * @static
  2502. */
  2503. public static function purge($name = null){
  2504. \Illuminate\Database\DatabaseManager::purge($name);
  2505. }
  2506. /**
  2507. * Disconnect from the given database.
  2508. *
  2509. * @param string $name
  2510. * @return void
  2511. * @static
  2512. */
  2513. public static function disconnect($name = null){
  2514. \Illuminate\Database\DatabaseManager::disconnect($name);
  2515. }
  2516. /**
  2517. * Reconnect to the given database.
  2518. *
  2519. * @param string $name
  2520. * @return \Illuminate\Database\Connection
  2521. * @static
  2522. */
  2523. public static function reconnect($name = null){
  2524. return \Illuminate\Database\DatabaseManager::reconnect($name);
  2525. }
  2526. /**
  2527. * Get the default connection name.
  2528. *
  2529. * @return string
  2530. * @static
  2531. */
  2532. public static function getDefaultConnection(){
  2533. return \Illuminate\Database\DatabaseManager::getDefaultConnection();
  2534. }
  2535. /**
  2536. * Set the default connection name.
  2537. *
  2538. * @param string $name
  2539. * @return void
  2540. * @static
  2541. */
  2542. public static function setDefaultConnection($name){
  2543. \Illuminate\Database\DatabaseManager::setDefaultConnection($name);
  2544. }
  2545. /**
  2546. * Register an extension connection resolver.
  2547. *
  2548. * @param string $name
  2549. * @param callable $resolver
  2550. * @return void
  2551. * @static
  2552. */
  2553. public static function extend($name, $resolver){
  2554. \Illuminate\Database\DatabaseManager::extend($name, $resolver);
  2555. }
  2556. /**
  2557. * Return all of the created connections.
  2558. *
  2559. * @return array
  2560. * @static
  2561. */
  2562. public static function getConnections(){
  2563. return \Illuminate\Database\DatabaseManager::getConnections();
  2564. }
  2565. /**
  2566. * Get a schema builder instance for the connection.
  2567. *
  2568. * @return \Illuminate\Database\Schema\MySqlBuilder
  2569. * @static
  2570. */
  2571. public static function getSchemaBuilder(){
  2572. return \Illuminate\Database\MySqlConnection::getSchemaBuilder();
  2573. }
  2574. /**
  2575. * Set the query grammar to the default implementation.
  2576. *
  2577. * @return void
  2578. * @static
  2579. */
  2580. public static function useDefaultQueryGrammar(){
  2581. //Method inherited from \Illuminate\Database\Connection
  2582. \Illuminate\Database\MySqlConnection::useDefaultQueryGrammar();
  2583. }
  2584. /**
  2585. * Set the schema grammar to the default implementation.
  2586. *
  2587. * @return void
  2588. * @static
  2589. */
  2590. public static function useDefaultSchemaGrammar(){
  2591. //Method inherited from \Illuminate\Database\Connection
  2592. \Illuminate\Database\MySqlConnection::useDefaultSchemaGrammar();
  2593. }
  2594. /**
  2595. * Set the query post processor to the default implementation.
  2596. *
  2597. * @return void
  2598. * @static
  2599. */
  2600. public static function useDefaultPostProcessor(){
  2601. //Method inherited from \Illuminate\Database\Connection
  2602. \Illuminate\Database\MySqlConnection::useDefaultPostProcessor();
  2603. }
  2604. /**
  2605. * Begin a fluent query against a database table.
  2606. *
  2607. * @param string $table
  2608. * @return \Illuminate\Database\Query\Builder
  2609. * @static
  2610. */
  2611. public static function table($table){
  2612. //Method inherited from \Illuminate\Database\Connection
  2613. return \Illuminate\Database\MySqlConnection::table($table);
  2614. }
  2615. /**
  2616. * Get a new raw query expression.
  2617. *
  2618. * @param mixed $value
  2619. * @return \Illuminate\Database\Query\Expression
  2620. * @static
  2621. */
  2622. public static function raw($value){
  2623. //Method inherited from \Illuminate\Database\Connection
  2624. return \Illuminate\Database\MySqlConnection::raw($value);
  2625. }
  2626. /**
  2627. * Run a select statement and return a single result.
  2628. *
  2629. * @param string $query
  2630. * @param array $bindings
  2631. * @return mixed
  2632. * @static
  2633. */
  2634. public static function selectOne($query, $bindings = array()){
  2635. //Method inherited from \Illuminate\Database\Connection
  2636. return \Illuminate\Database\MySqlConnection::selectOne($query, $bindings);
  2637. }
  2638. /**
  2639. * Run a select statement against the database.
  2640. *
  2641. * @param string $query
  2642. * @param array $bindings
  2643. * @return array
  2644. * @static
  2645. */
  2646. public static function selectFromWriteConnection($query, $bindings = array()){
  2647. //Method inherited from \Illuminate\Database\Connection
  2648. return \Illuminate\Database\MySqlConnection::selectFromWriteConnection($query, $bindings);
  2649. }
  2650. /**
  2651. * Run a select statement against the database.
  2652. *
  2653. * @param string $query
  2654. * @param array $bindings
  2655. * @param bool $useReadPdo
  2656. * @return array
  2657. * @static
  2658. */
  2659. public static function select($query, $bindings = array(), $useReadPdo = true){
  2660. //Method inherited from \Illuminate\Database\Connection
  2661. return \Illuminate\Database\MySqlConnection::select($query, $bindings, $useReadPdo);
  2662. }
  2663. /**
  2664. * Run an insert statement against the database.
  2665. *
  2666. * @param string $query
  2667. * @param array $bindings
  2668. * @return bool
  2669. * @static
  2670. */
  2671. public static function insert($query, $bindings = array()){
  2672. //Method inherited from \Illuminate\Database\Connection
  2673. return \Illuminate\Database\MySqlConnection::insert($query, $bindings);
  2674. }
  2675. /**
  2676. * Run an update statement against the database.
  2677. *
  2678. * @param string $query
  2679. * @param array $bindings
  2680. * @return int
  2681. * @static
  2682. */
  2683. public static function update($query, $bindings = array()){
  2684. //Method inherited from \Illuminate\Database\Connection
  2685. return \Illuminate\Database\MySqlConnection::update($query, $bindings);
  2686. }
  2687. /**
  2688. * Run a delete statement against the database.
  2689. *
  2690. * @param string $query
  2691. * @param array $bindings
  2692. * @return int
  2693. * @static
  2694. */
  2695. public static function delete($query, $bindings = array()){
  2696. //Method inherited from \Illuminate\Database\Connection
  2697. return \Illuminate\Database\MySqlConnection::delete($query, $bindings);
  2698. }
  2699. /**
  2700. * Execute an SQL statement and return the boolean result.
  2701. *
  2702. * @param string $query
  2703. * @param array $bindings
  2704. * @return bool
  2705. * @static
  2706. */
  2707. public static function statement($query, $bindings = array()){
  2708. //Method inherited from \Illuminate\Database\Connection
  2709. return \Illuminate\Database\MySqlConnection::statement($query, $bindings);
  2710. }
  2711. /**
  2712. * Run an SQL statement and get the number of rows affected.
  2713. *
  2714. * @param string $query
  2715. * @param array $bindings
  2716. * @return int
  2717. * @static
  2718. */
  2719. public static function affectingStatement($query, $bindings = array()){
  2720. //Method inherited from \Illuminate\Database\Connection
  2721. return \Illuminate\Database\MySqlConnection::affectingStatement($query, $bindings);
  2722. }
  2723. /**
  2724. * Run a raw, unprepared query against the PDO connection.
  2725. *
  2726. * @param string $query
  2727. * @return bool
  2728. * @static
  2729. */
  2730. public static function unprepared($query){
  2731. //Method inherited from \Illuminate\Database\Connection
  2732. return \Illuminate\Database\MySqlConnection::unprepared($query);
  2733. }
  2734. /**
  2735. * Prepare the query bindings for execution.
  2736. *
  2737. * @param array $bindings
  2738. * @return array
  2739. * @static
  2740. */
  2741. public static function prepareBindings($bindings){
  2742. //Method inherited from \Illuminate\Database\Connection
  2743. return \Illuminate\Database\MySqlConnection::prepareBindings($bindings);
  2744. }
  2745. /**
  2746. * Execute a Closure within a transaction.
  2747. *
  2748. * @param \Closure $callback
  2749. * @return mixed
  2750. * @throws \Exception
  2751. * @static
  2752. */
  2753. public static function transaction($callback){
  2754. //Method inherited from \Illuminate\Database\Connection
  2755. return \Illuminate\Database\MySqlConnection::transaction($callback);
  2756. }
  2757. /**
  2758. * Start a new database transaction.
  2759. *
  2760. * @return void
  2761. * @static
  2762. */
  2763. public static function beginTransaction(){
  2764. //Method inherited from \Illuminate\Database\Connection
  2765. \Illuminate\Database\MySqlConnection::beginTransaction();
  2766. }
  2767. /**
  2768. * Commit the active database transaction.
  2769. *
  2770. * @return void
  2771. * @static
  2772. */
  2773. public static function commit(){
  2774. //Method inherited from \Illuminate\Database\Connection
  2775. \Illuminate\Database\MySqlConnection::commit();
  2776. }
  2777. /**
  2778. * Rollback the active database transaction.
  2779. *
  2780. * @return void
  2781. * @static
  2782. */
  2783. public static function rollBack(){
  2784. //Method inherited from \Illuminate\Database\Connection
  2785. \Illuminate\Database\MySqlConnection::rollBack();
  2786. }
  2787. /**
  2788. * Get the number of active transactions.
  2789. *
  2790. * @return int
  2791. * @static
  2792. */
  2793. public static function transactionLevel(){
  2794. //Method inherited from \Illuminate\Database\Connection
  2795. return \Illuminate\Database\MySqlConnection::transactionLevel();
  2796. }
  2797. /**
  2798. * Execute the given callback in "dry run" mode.
  2799. *
  2800. * @param \Closure $callback
  2801. * @return array
  2802. * @static
  2803. */
  2804. public static function pretend($callback){
  2805. //Method inherited from \Illuminate\Database\Connection
  2806. return \Illuminate\Database\MySqlConnection::pretend($callback);
  2807. }
  2808. /**
  2809. * Log a query in the connection's query log.
  2810. *
  2811. * @param string $query
  2812. * @param array $bindings
  2813. * @param float|null $time
  2814. * @return void
  2815. * @static
  2816. */
  2817. public static function logQuery($query, $bindings, $time = null){
  2818. //Method inherited from \Illuminate\Database\Connection
  2819. \Illuminate\Database\MySqlConnection::logQuery($query, $bindings, $time);
  2820. }
  2821. /**
  2822. * Register a database query listener with the connection.
  2823. *
  2824. * @param \Closure $callback
  2825. * @return void
  2826. * @static
  2827. */
  2828. public static function listen($callback){
  2829. //Method inherited from \Illuminate\Database\Connection
  2830. \Illuminate\Database\MySqlConnection::listen($callback);
  2831. }
  2832. /**
  2833. * Get a Doctrine Schema Column instance.
  2834. *
  2835. * @param string $table
  2836. * @param string $column
  2837. * @return \Doctrine\DBAL\Schema\Column
  2838. * @static
  2839. */
  2840. public static function getDoctrineColumn($table, $column){
  2841. //Method inherited from \Illuminate\Database\Connection
  2842. return \Illuminate\Database\MySqlConnection::getDoctrineColumn($table, $column);
  2843. }
  2844. /**
  2845. * Get the Doctrine DBAL schema manager for the connection.
  2846. *
  2847. * @return \Doctrine\DBAL\Schema\AbstractSchemaManager
  2848. * @static
  2849. */
  2850. public static function getDoctrineSchemaManager(){
  2851. //Method inherited from \Illuminate\Database\Connection
  2852. return \Illuminate\Database\MySqlConnection::getDoctrineSchemaManager();
  2853. }
  2854. /**
  2855. * Get the Doctrine DBAL database connection instance.
  2856. *
  2857. * @return \Doctrine\DBAL\Connection
  2858. * @static
  2859. */
  2860. public static function getDoctrineConnection(){
  2861. //Method inherited from \Illuminate\Database\Connection
  2862. return \Illuminate\Database\MySqlConnection::getDoctrineConnection();
  2863. }
  2864. /**
  2865. * Get the current PDO connection.
  2866. *
  2867. * @return \PDO
  2868. * @static
  2869. */
  2870. public static function getPdo(){
  2871. //Method inherited from \Illuminate\Database\Connection
  2872. return \Illuminate\Database\MySqlConnection::getPdo();
  2873. }
  2874. /**
  2875. * Get the current PDO connection used for reading.
  2876. *
  2877. * @return \PDO
  2878. * @static
  2879. */
  2880. public static function getReadPdo(){
  2881. //Method inherited from \Illuminate\Database\Connection
  2882. return \Illuminate\Database\MySqlConnection::getReadPdo();
  2883. }
  2884. /**
  2885. * Set the PDO connection.
  2886. *
  2887. * @param \PDO|null $pdo
  2888. * @return $this
  2889. * @static
  2890. */
  2891. public static function setPdo($pdo){
  2892. //Method inherited from \Illuminate\Database\Connection
  2893. return \Illuminate\Database\MySqlConnection::setPdo($pdo);
  2894. }
  2895. /**
  2896. * Set the PDO connection used for reading.
  2897. *
  2898. * @param \PDO|null $pdo
  2899. * @return $this
  2900. * @static
  2901. */
  2902. public static function setReadPdo($pdo){
  2903. //Method inherited from \Illuminate\Database\Connection
  2904. return \Illuminate\Database\MySqlConnection::setReadPdo($pdo);
  2905. }
  2906. /**
  2907. * Set the reconnect instance on the connection.
  2908. *
  2909. * @param callable $reconnector
  2910. * @return $this
  2911. * @static
  2912. */
  2913. public static function setReconnector($reconnector){
  2914. //Method inherited from \Illuminate\Database\Connection
  2915. return \Illuminate\Database\MySqlConnection::setReconnector($reconnector);
  2916. }
  2917. /**
  2918. * Get the database connection name.
  2919. *
  2920. * @return string|null
  2921. * @static
  2922. */
  2923. public static function getName(){
  2924. //Method inherited from \Illuminate\Database\Connection
  2925. return \Illuminate\Database\MySqlConnection::getName();
  2926. }
  2927. /**
  2928. * Get an option from the configuration options.
  2929. *
  2930. * @param string $option
  2931. * @return mixed
  2932. * @static
  2933. */
  2934. public static function getConfig($option){
  2935. //Method inherited from \Illuminate\Database\Connection
  2936. return \Illuminate\Database\MySqlConnection::getConfig($option);
  2937. }
  2938. /**
  2939. * Get the PDO driver name.
  2940. *
  2941. * @return string
  2942. * @static
  2943. */
  2944. public static function getDriverName(){
  2945. //Method inherited from \Illuminate\Database\Connection
  2946. return \Illuminate\Database\MySqlConnection::getDriverName();
  2947. }
  2948. /**
  2949. * Get the query grammar used by the connection.
  2950. *
  2951. * @return \Illuminate\Database\Query\Grammars\Grammar
  2952. * @static
  2953. */
  2954. public static function getQueryGrammar(){
  2955. //Method inherited from \Illuminate\Database\Connection
  2956. return \Illuminate\Database\MySqlConnection::getQueryGrammar();
  2957. }
  2958. /**
  2959. * Set the query grammar used by the connection.
  2960. *
  2961. * @param \Illuminate\Database\Query\Grammars\Grammar
  2962. * @return void
  2963. * @static
  2964. */
  2965. public static function setQueryGrammar($grammar){
  2966. //Method inherited from \Illuminate\Database\Connection
  2967. \Illuminate\Database\MySqlConnection::setQueryGrammar($grammar);
  2968. }
  2969. /**
  2970. * Get the schema grammar used by the connection.
  2971. *
  2972. * @return \Illuminate\Database\Query\Grammars\Grammar
  2973. * @static
  2974. */
  2975. public static function getSchemaGrammar(){
  2976. //Method inherited from \Illuminate\Database\Connection
  2977. return \Illuminate\Database\MySqlConnection::getSchemaGrammar();
  2978. }
  2979. /**
  2980. * Set the schema grammar used by the connection.
  2981. *
  2982. * @param \Illuminate\Database\Schema\Grammars\Grammar
  2983. * @return void
  2984. * @static
  2985. */
  2986. public static function setSchemaGrammar($grammar){
  2987. //Method inherited from \Illuminate\Database\Connection
  2988. \Illuminate\Database\MySqlConnection::setSchemaGrammar($grammar);
  2989. }
  2990. /**
  2991. * Get the query post processor used by the connection.
  2992. *
  2993. * @return \Illuminate\Database\Query\Processors\Processor
  2994. * @static
  2995. */
  2996. public static function getPostProcessor(){
  2997. //Method inherited from \Illuminate\Database\Connection
  2998. return \Illuminate\Database\MySqlConnection::getPostProcessor();
  2999. }
  3000. /**
  3001. * Set the query post processor used by the connection.
  3002. *
  3003. * @param \Illuminate\Database\Query\Processors\Processor
  3004. * @return void
  3005. * @static
  3006. */
  3007. public static function setPostProcessor($processor){
  3008. //Method inherited from \Illuminate\Database\Connection
  3009. \Illuminate\Database\MySqlConnection::setPostProcessor($processor);
  3010. }
  3011. /**
  3012. * Get the event dispatcher used by the connection.
  3013. *
  3014. * @return \Illuminate\Events\Dispatcher
  3015. * @static
  3016. */
  3017. public static function getEventDispatcher(){
  3018. //Method inherited from \Illuminate\Database\Connection
  3019. return \Illuminate\Database\MySqlConnection::getEventDispatcher();
  3020. }
  3021. /**
  3022. * Set the event dispatcher instance on the connection.
  3023. *
  3024. * @param \Illuminate\Events\Dispatcher
  3025. * @return void
  3026. * @static
  3027. */
  3028. public static function setEventDispatcher($events){
  3029. //Method inherited from \Illuminate\Database\Connection
  3030. \Illuminate\Database\MySqlConnection::setEventDispatcher($events);
  3031. }
  3032. /**
  3033. * Get the paginator environment instance.
  3034. *
  3035. * @return \Illuminate\Pagination\Factory
  3036. * @static
  3037. */
  3038. public static function getPaginator(){
  3039. //Method inherited from \Illuminate\Database\Connection
  3040. return \Illuminate\Database\MySqlConnection::getPaginator();
  3041. }
  3042. /**
  3043. * Set the pagination environment instance.
  3044. *
  3045. * @param \Illuminate\Pagination\Factory|\Closure $paginator
  3046. * @return void
  3047. * @static
  3048. */
  3049. public static function setPaginator($paginator){
  3050. //Method inherited from \Illuminate\Database\Connection
  3051. \Illuminate\Database\MySqlConnection::setPaginator($paginator);
  3052. }
  3053. /**
  3054. * Get the cache manager instance.
  3055. *
  3056. * @return \Illuminate\Cache\CacheManager
  3057. * @static
  3058. */
  3059. public static function getCacheManager(){
  3060. //Method inherited from \Illuminate\Database\Connection
  3061. return \Illuminate\Database\MySqlConnection::getCacheManager();
  3062. }
  3063. /**
  3064. * Set the cache manager instance on the connection.
  3065. *
  3066. * @param \Illuminate\Cache\CacheManager|\Closure $cache
  3067. * @return void
  3068. * @static
  3069. */
  3070. public static function setCacheManager($cache){
  3071. //Method inherited from \Illuminate\Database\Connection
  3072. \Illuminate\Database\MySqlConnection::setCacheManager($cache);
  3073. }
  3074. /**
  3075. * Determine if the connection in a "dry run".
  3076. *
  3077. * @return bool
  3078. * @static
  3079. */
  3080. public static function pretending(){
  3081. //Method inherited from \Illuminate\Database\Connection
  3082. return \Illuminate\Database\MySqlConnection::pretending();
  3083. }
  3084. /**
  3085. * Get the default fetch mode for the connection.
  3086. *
  3087. * @return int
  3088. * @static
  3089. */
  3090. public static function getFetchMode(){
  3091. //Method inherited from \Illuminate\Database\Connection
  3092. return \Illuminate\Database\MySqlConnection::getFetchMode();
  3093. }
  3094. /**
  3095. * Set the default fetch mode for the connection.
  3096. *
  3097. * @param int $fetchMode
  3098. * @return int
  3099. * @static
  3100. */
  3101. public static function setFetchMode($fetchMode){
  3102. //Method inherited from \Illuminate\Database\Connection
  3103. return \Illuminate\Database\MySqlConnection::setFetchMode($fetchMode);
  3104. }
  3105. /**
  3106. * Get the connection query log.
  3107. *
  3108. * @return array
  3109. * @static
  3110. */
  3111. public static function getQueryLog(){
  3112. //Method inherited from \Illuminate\Database\Connection
  3113. return \Illuminate\Database\MySqlConnection::getQueryLog();
  3114. }
  3115. /**
  3116. * Clear the query log.
  3117. *
  3118. * @return void
  3119. * @static
  3120. */
  3121. public static function flushQueryLog(){
  3122. //Method inherited from \Illuminate\Database\Connection
  3123. \Illuminate\Database\MySqlConnection::flushQueryLog();
  3124. }
  3125. /**
  3126. * Enable the query log on the connection.
  3127. *
  3128. * @return void
  3129. * @static
  3130. */
  3131. public static function enableQueryLog(){
  3132. //Method inherited from \Illuminate\Database\Connection
  3133. \Illuminate\Database\MySqlConnection::enableQueryLog();
  3134. }
  3135. /**
  3136. * Disable the query log on the connection.
  3137. *
  3138. * @return void
  3139. * @static
  3140. */
  3141. public static function disableQueryLog(){
  3142. //Method inherited from \Illuminate\Database\Connection
  3143. \Illuminate\Database\MySqlConnection::disableQueryLog();
  3144. }
  3145. /**
  3146. * Determine whether we're logging queries.
  3147. *
  3148. * @return bool
  3149. * @static
  3150. */
  3151. public static function logging(){
  3152. //Method inherited from \Illuminate\Database\Connection
  3153. return \Illuminate\Database\MySqlConnection::logging();
  3154. }
  3155. /**
  3156. * Get the name of the connected database.
  3157. *
  3158. * @return string
  3159. * @static
  3160. */
  3161. public static function getDatabaseName(){
  3162. //Method inherited from \Illuminate\Database\Connection
  3163. return \Illuminate\Database\MySqlConnection::getDatabaseName();
  3164. }
  3165. /**
  3166. * Set the name of the connected database.
  3167. *
  3168. * @param string $database
  3169. * @return string
  3170. * @static
  3171. */
  3172. public static function setDatabaseName($database){
  3173. //Method inherited from \Illuminate\Database\Connection
  3174. return \Illuminate\Database\MySqlConnection::setDatabaseName($database);
  3175. }
  3176. /**
  3177. * Get the table prefix for the connection.
  3178. *
  3179. * @return string
  3180. * @static
  3181. */
  3182. public static function getTablePrefix(){
  3183. //Method inherited from \Illuminate\Database\Connection
  3184. return \Illuminate\Database\MySqlConnection::getTablePrefix();
  3185. }
  3186. /**
  3187. * Set the table prefix in use by the connection.
  3188. *
  3189. * @param string $prefix
  3190. * @return void
  3191. * @static
  3192. */
  3193. public static function setTablePrefix($prefix){
  3194. //Method inherited from \Illuminate\Database\Connection
  3195. \Illuminate\Database\MySqlConnection::setTablePrefix($prefix);
  3196. }
  3197. /**
  3198. * Set the table prefix and return the grammar.
  3199. *
  3200. * @param \Illuminate\Database\Grammar $grammar
  3201. * @return \Illuminate\Database\Grammar
  3202. * @static
  3203. */
  3204. public static function withTablePrefix($grammar){
  3205. //Method inherited from \Illuminate\Database\Connection
  3206. return \Illuminate\Database\MySqlConnection::withTablePrefix($grammar);
  3207. }
  3208. }
  3209. class Eloquent extends \Illuminate\Database\Eloquent\Model{
  3210. /**
  3211. * Find a model by its primary key.
  3212. *
  3213. * @param array $id
  3214. * @param array $columns
  3215. * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static
  3216. * @static
  3217. */
  3218. public static function findMany($id, $columns = array()){
  3219. return \Illuminate\Database\Eloquent\Builder::findMany($id, $columns);
  3220. }
  3221. /**
  3222. * Execute the query and get the first result.
  3223. *
  3224. * @param array $columns
  3225. * @return \Illuminate\Database\Eloquent\Model|static|null
  3226. * @static
  3227. */
  3228. public static function first($columns = array()){
  3229. return \Illuminate\Database\Eloquent\Builder::first($columns);
  3230. }
  3231. /**
  3232. * Execute the query and get the first result or throw an exception.
  3233. *
  3234. * @param array $columns
  3235. * @return \Illuminate\Database\Eloquent\Model|static
  3236. * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
  3237. * @static
  3238. */
  3239. public static function firstOrFail($columns = array()){
  3240. return \Illuminate\Database\Eloquent\Builder::firstOrFail($columns);
  3241. }
  3242. /**
  3243. * Execute the query as a "select" statement.
  3244. *
  3245. * @param array $columns
  3246. * @return \Illuminate\Database\Eloquent\Collection|static[]
  3247. * @static
  3248. */
  3249. public static function get($columns = array()){
  3250. return \Illuminate\Database\Eloquent\Builder::get($columns);
  3251. }
  3252. /**
  3253. * Pluck a single column from the database.
  3254. *
  3255. * @param string $column
  3256. * @return mixed
  3257. * @static
  3258. */
  3259. public static function pluck($column){
  3260. return \Illuminate\Database\Eloquent\Builder::pluck($column);
  3261. }
  3262. /**
  3263. * Chunk the results of the query.
  3264. *
  3265. * @param int $count
  3266. * @param callable $callback
  3267. * @return void
  3268. * @static
  3269. */
  3270. public static function chunk($count, $callback){
  3271. \Illuminate\Database\Eloquent\Builder::chunk($count, $callback);
  3272. }
  3273. /**
  3274. * Get an array with the values of a given column.
  3275. *
  3276. * @param string $column
  3277. * @param string $key
  3278. * @return array
  3279. * @static
  3280. */
  3281. public static function lists($column, $key = null){
  3282. return \Illuminate\Database\Eloquent\Builder::lists($column, $key);
  3283. }
  3284. /**
  3285. * Get a paginator for the "select" statement.
  3286. *
  3287. * @param int $perPage
  3288. * @param array $columns
  3289. * @return \Illuminate\Pagination\Paginator
  3290. * @static
  3291. */
  3292. public static function paginate($perPage = null, $columns = array()){
  3293. return \Illuminate\Database\Eloquent\Builder::paginate($perPage, $columns);
  3294. }
  3295. /**
  3296. * Get a paginator only supporting simple next and previous links.
  3297. *
  3298. * This is more efficient on larger data-sets, etc.
  3299. *
  3300. * @param int $perPage
  3301. * @param array $columns
  3302. * @return \Illuminate\Pagination\Paginator
  3303. * @static
  3304. */
  3305. public static function simplePaginate($perPage = null, $columns = array()){
  3306. return \Illuminate\Database\Eloquent\Builder::simplePaginate($perPage, $columns);
  3307. }
  3308. /**
  3309. * Register a replacement for the default delete function.
  3310. *
  3311. * @param \Closure $callback
  3312. * @return void
  3313. * @static
  3314. */
  3315. public static function onDelete($callback){
  3316. \Illuminate\Database\Eloquent\Builder::onDelete($callback);
  3317. }
  3318. /**
  3319. * Get the hydrated models without eager loading.
  3320. *
  3321. * @param array $columns
  3322. * @return \Illuminate\Database\Eloquent\Model[]
  3323. * @static
  3324. */
  3325. public static function getModels($columns = array()){
  3326. return \Illuminate\Database\Eloquent\Builder::getModels($columns);
  3327. }
  3328. /**
  3329. * Eager load the relationships for the models.
  3330. *
  3331. * @param array $models
  3332. * @return array
  3333. * @static
  3334. */
  3335. public static function eagerLoadRelations($models){
  3336. return \Illuminate\Database\Eloquent\Builder::eagerLoadRelations($models);
  3337. }
  3338. /**
  3339. * Add a basic where clause to the query.
  3340. *
  3341. * @param string $column
  3342. * @param string $operator
  3343. * @param mixed $value
  3344. * @param string $boolean
  3345. * @return $this
  3346. * @static
  3347. */
  3348. public static function where($column, $operator = null, $value = null, $boolean = 'and'){
  3349. return \Illuminate\Database\Eloquent\Builder::where($column, $operator, $value, $boolean);
  3350. }
  3351. /**
  3352. * Add an "or where" clause to the query.
  3353. *
  3354. * @param string $column
  3355. * @param string $operator
  3356. * @param mixed $value
  3357. * @return \Illuminate\Database\Eloquent\Builder|static
  3358. * @static
  3359. */
  3360. public static function orWhere($column, $operator = null, $value = null){
  3361. return \Illuminate\Database\Eloquent\Builder::orWhere($column, $operator, $value);
  3362. }
  3363. /**
  3364. * Add a relationship count condition to the query.
  3365. *
  3366. * @param string $relation
  3367. * @param string $operator
  3368. * @param int $count
  3369. * @param string $boolean
  3370. * @param \Closure|null $callback
  3371. * @return \Illuminate\Database\Eloquent\Builder|static
  3372. * @static
  3373. */
  3374. public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null){
  3375. return \Illuminate\Database\Eloquent\Builder::has($relation, $operator, $count, $boolean, $callback);
  3376. }
  3377. /**
  3378. * Add a relationship count condition to the query.
  3379. *
  3380. * @param string $relation
  3381. * @param string $boolean
  3382. * @param \Closure|null $callback
  3383. * @return \Illuminate\Database\Eloquent\Builder|static
  3384. * @static
  3385. */
  3386. public static function doesntHave($relation, $boolean = 'and', $callback = null){
  3387. return \Illuminate\Database\Eloquent\Builder::doesntHave($relation, $boolean, $callback);
  3388. }
  3389. /**
  3390. * Add a relationship count condition to the query with where clauses.
  3391. *
  3392. * @param string $relation
  3393. * @param \Closure $callback
  3394. * @param string $operator
  3395. * @param int $count
  3396. * @return \Illuminate\Database\Eloquent\Builder|static
  3397. * @static
  3398. */
  3399. public static function whereHas($relation, $callback, $operator = '>=', $count = 1){
  3400. return \Illuminate\Database\Eloquent\Builder::whereHas($relation, $callback, $operator, $count);
  3401. }
  3402. /**
  3403. * Add a relationship count condition to the query with where clauses.
  3404. *
  3405. * @param string $relation
  3406. * @param \Closure|null $callback
  3407. * @return \Illuminate\Database\Eloquent\Builder|static
  3408. * @static
  3409. */
  3410. public static function whereDoesntHave($relation, $callback = null){
  3411. return \Illuminate\Database\Eloquent\Builder::whereDoesntHave($relation, $callback);
  3412. }
  3413. /**
  3414. * Add a relationship count condition to the query with an "or".
  3415. *
  3416. * @param string $relation
  3417. * @param string $operator
  3418. * @param int $count
  3419. * @return \Illuminate\Database\Eloquent\Builder|static
  3420. * @static
  3421. */
  3422. public static function orHas($relation, $operator = '>=', $count = 1){
  3423. return \Illuminate\Database\Eloquent\Builder::orHas($relation, $operator, $count);
  3424. }
  3425. /**
  3426. * Add a relationship count condition to the query with where clauses and an "or".
  3427. *
  3428. * @param string $relation
  3429. * @param \Closure $callback
  3430. * @param string $operator
  3431. * @param int $count
  3432. * @return \Illuminate\Database\Eloquent\Builder|static
  3433. * @static
  3434. */
  3435. public static function orWhereHas($relation, $callback, $operator = '>=', $count = 1){
  3436. return \Illuminate\Database\Eloquent\Builder::orWhereHas($relation, $callback, $operator, $count);
  3437. }
  3438. /**
  3439. * Get the underlying query builder instance.
  3440. *
  3441. * @return \Illuminate\Database\Query\Builder|static
  3442. * @static
  3443. */
  3444. public static function getQuery(){
  3445. return \Illuminate\Database\Eloquent\Builder::getQuery();
  3446. }
  3447. /**
  3448. * Set the underlying query builder instance.
  3449. *
  3450. * @param \Illuminate\Database\Query\Builder $query
  3451. * @return void
  3452. * @static
  3453. */
  3454. public static function setQuery($query){
  3455. \Illuminate\Database\Eloquent\Builder::setQuery($query);
  3456. }
  3457. /**
  3458. * Get the relationships being eagerly loaded.
  3459. *
  3460. * @return array
  3461. * @static
  3462. */
  3463. public static function getEagerLoads(){
  3464. return \Illuminate\Database\Eloquent\Builder::getEagerLoads();
  3465. }
  3466. /**
  3467. * Set the relationships being eagerly loaded.
  3468. *
  3469. * @param array $eagerLoad
  3470. * @return void
  3471. * @static
  3472. */
  3473. public static function setEagerLoads($eagerLoad){
  3474. \Illuminate\Database\Eloquent\Builder::setEagerLoads($eagerLoad);
  3475. }
  3476. /**
  3477. * Get the model instance being queried.
  3478. *
  3479. * @return \Illuminate\Database\Eloquent\Model
  3480. * @static
  3481. */
  3482. public static function getModel(){
  3483. return \Illuminate\Database\Eloquent\Builder::getModel();
  3484. }
  3485. /**
  3486. * Set a model instance for the model being queried.
  3487. *
  3488. * @param \Illuminate\Database\Eloquent\Model $model
  3489. * @return $this
  3490. * @static
  3491. */
  3492. public static function setModel($model){
  3493. return \Illuminate\Database\Eloquent\Builder::setModel($model);
  3494. }
  3495. /**
  3496. * Extend the builder with a given callback.
  3497. *
  3498. * @param string $name
  3499. * @param \Closure $callback
  3500. * @return void
  3501. * @static
  3502. */
  3503. public static function macro($name, $callback){
  3504. \Illuminate\Database\Eloquent\Builder::macro($name, $callback);
  3505. }
  3506. /**
  3507. * Get the given macro by name.
  3508. *
  3509. * @param string $name
  3510. * @return \Closure
  3511. * @static
  3512. */
  3513. public static function getMacro($name){
  3514. return \Illuminate\Database\Eloquent\Builder::getMacro($name);
  3515. }
  3516. /**
  3517. * Set the columns to be selected.
  3518. *
  3519. * @param array $columns
  3520. * @return $this
  3521. * @static
  3522. */
  3523. public static function select($columns = array()){
  3524. return \Illuminate\Database\Query\Builder::select($columns);
  3525. }
  3526. /**
  3527. * Add a new "raw" select expression to the query.
  3528. *
  3529. * @param string $expression
  3530. * @return \Illuminate\Database\Query\Builder|static
  3531. * @static
  3532. */
  3533. public static function selectRaw($expression){
  3534. return \Illuminate\Database\Query\Builder::selectRaw($expression);
  3535. }
  3536. /**
  3537. * Add a new select column to the query.
  3538. *
  3539. * @param mixed $column
  3540. * @return $this
  3541. * @static
  3542. */
  3543. public static function addSelect($column){
  3544. return \Illuminate\Database\Query\Builder::addSelect($column);
  3545. }
  3546. /**
  3547. * Force the query to only return distinct results.
  3548. *
  3549. * @return $this
  3550. * @static
  3551. */
  3552. public static function distinct(){
  3553. return \Illuminate\Database\Query\Builder::distinct();
  3554. }
  3555. /**
  3556. * Set the table which the query is targeting.
  3557. *
  3558. * @param string $table
  3559. * @return $this
  3560. * @static
  3561. */
  3562. public static function from($table){
  3563. return \Illuminate\Database\Query\Builder::from($table);
  3564. }
  3565. /**
  3566. * Add a join clause to the query.
  3567. *
  3568. * @param string $table
  3569. * @param string $one
  3570. * @param string $operator
  3571. * @param string $two
  3572. * @param string $type
  3573. * @param bool $where
  3574. * @return $this
  3575. * @static
  3576. */
  3577. public static function join($table, $one, $operator = null, $two = null, $type = 'inner', $where = false){
  3578. return \Illuminate\Database\Query\Builder::join($table, $one, $operator, $two, $type, $where);
  3579. }
  3580. /**
  3581. * Add a "join where" clause to the query.
  3582. *
  3583. * @param string $table
  3584. * @param string $one
  3585. * @param string $operator
  3586. * @param string $two
  3587. * @param string $type
  3588. * @return \Illuminate\Database\Query\Builder|static
  3589. * @static
  3590. */
  3591. public static function joinWhere($table, $one, $operator, $two, $type = 'inner'){
  3592. return \Illuminate\Database\Query\Builder::joinWhere($table, $one, $operator, $two, $type);
  3593. }
  3594. /**
  3595. * Add a left join to the query.
  3596. *
  3597. * @param string $table
  3598. * @param string $first
  3599. * @param string $operator
  3600. * @param string $second
  3601. * @return \Illuminate\Database\Query\Builder|static
  3602. * @static
  3603. */
  3604. public static function leftJoin($table, $first, $operator = null, $second = null){
  3605. return \Illuminate\Database\Query\Builder::leftJoin($table, $first, $operator, $second);
  3606. }
  3607. /**
  3608. * Add a "join where" clause to the query.
  3609. *
  3610. * @param string $table
  3611. * @param string $one
  3612. * @param string $operator
  3613. * @param string $two
  3614. * @return \Illuminate\Database\Query\Builder|static
  3615. * @static
  3616. */
  3617. public static function leftJoinWhere($table, $one, $operator, $two){
  3618. return \Illuminate\Database\Query\Builder::leftJoinWhere($table, $one, $operator, $two);
  3619. }
  3620. /**
  3621. * Add a right join to the query.
  3622. *
  3623. * @param string $table
  3624. * @param string $first
  3625. * @param string $operator
  3626. * @param string $second
  3627. * @return \Illuminate\Database\Query\Builder|static
  3628. * @static
  3629. */
  3630. public static function rightJoin($table, $first, $operator = null, $second = null){
  3631. return \Illuminate\Database\Query\Builder::rightJoin($table, $first, $operator, $second);
  3632. }
  3633. /**
  3634. * Add a "right join where" clause to the query.
  3635. *
  3636. * @param string $table
  3637. * @param string $one
  3638. * @param string $operator
  3639. * @param string $two
  3640. * @return \Illuminate\Database\Query\Builder|static
  3641. * @static
  3642. */
  3643. public static function rightJoinWhere($table, $one, $operator, $two){
  3644. return \Illuminate\Database\Query\Builder::rightJoinWhere($table, $one, $operator, $two);
  3645. }
  3646. /**
  3647. * Add a raw where clause to the query.
  3648. *
  3649. * @param string $sql
  3650. * @param array $bindings
  3651. * @param string $boolean
  3652. * @return $this
  3653. * @static
  3654. */
  3655. public static function whereRaw($sql, $bindings = array(), $boolean = 'and'){
  3656. return \Illuminate\Database\Query\Builder::whereRaw($sql, $bindings, $boolean);
  3657. }
  3658. /**
  3659. * Add a raw or where clause to the query.
  3660. *
  3661. * @param string $sql
  3662. * @param array $bindings
  3663. * @return \Illuminate\Database\Query\Builder|static
  3664. * @static
  3665. */
  3666. public static function orWhereRaw($sql, $bindings = array()){
  3667. return \Illuminate\Database\Query\Builder::orWhereRaw($sql, $bindings);
  3668. }
  3669. /**
  3670. * Add a where between statement to the query.
  3671. *
  3672. * @param string $column
  3673. * @param array $values
  3674. * @param string $boolean
  3675. * @param bool $not
  3676. * @return $this
  3677. * @static
  3678. */
  3679. public static function whereBetween($column, $values, $boolean = 'and', $not = false){
  3680. return \Illuminate\Database\Query\Builder::whereBetween($column, $values, $boolean, $not);
  3681. }
  3682. /**
  3683. * Add an or where between statement to the query.
  3684. *
  3685. * @param string $column
  3686. * @param array $values
  3687. * @return \Illuminate\Database\Query\Builder|static
  3688. * @static
  3689. */
  3690. public static function orWhereBetween($column, $values){
  3691. return \Illuminate\Database\Query\Builder::orWhereBetween($column, $values);
  3692. }
  3693. /**
  3694. * Add a where not between statement to the query.
  3695. *
  3696. * @param string $column
  3697. * @param array $values
  3698. * @param string $boolean
  3699. * @return \Illuminate\Database\Query\Builder|static
  3700. * @static
  3701. */
  3702. public static function whereNotBetween($column, $values, $boolean = 'and'){
  3703. return \Illuminate\Database\Query\Builder::whereNotBetween($column, $values, $boolean);
  3704. }
  3705. /**
  3706. * Add an or where not between statement to the query.
  3707. *
  3708. * @param string $column
  3709. * @param array $values
  3710. * @return \Illuminate\Database\Query\Builder|static
  3711. * @static
  3712. */
  3713. public static function orWhereNotBetween($column, $values){
  3714. return \Illuminate\Database\Query\Builder::orWhereNotBetween($column, $values);
  3715. }
  3716. /**
  3717. * Add a nested where statement to the query.
  3718. *
  3719. * @param \Closure $callback
  3720. * @param string $boolean
  3721. * @return \Illuminate\Database\Query\Builder|static
  3722. * @static
  3723. */
  3724. public static function whereNested($callback, $boolean = 'and'){
  3725. return \Illuminate\Database\Query\Builder::whereNested($callback, $boolean);
  3726. }
  3727. /**
  3728. * Add another query builder as a nested where to the query builder.
  3729. *
  3730. * @param \Illuminate\Database\Query\Builder|static $query
  3731. * @param string $boolean
  3732. * @return $this
  3733. * @static
  3734. */
  3735. public static function addNestedWhereQuery($query, $boolean = 'and'){
  3736. return \Illuminate\Database\Query\Builder::addNestedWhereQuery($query, $boolean);
  3737. }
  3738. /**
  3739. * Add an exists clause to the query.
  3740. *
  3741. * @param \Closure $callback
  3742. * @param string $boolean
  3743. * @param bool $not
  3744. * @return $this
  3745. * @static
  3746. */
  3747. public static function whereExists($callback, $boolean = 'and', $not = false){
  3748. return \Illuminate\Database\Query\Builder::whereExists($callback, $boolean, $not);
  3749. }
  3750. /**
  3751. * Add an or exists clause to the query.
  3752. *
  3753. * @param \Closure $callback
  3754. * @param bool $not
  3755. * @return \Illuminate\Database\Query\Builder|static
  3756. * @static
  3757. */
  3758. public static function orWhereExists($callback, $not = false){
  3759. return \Illuminate\Database\Query\Builder::orWhereExists($callback, $not);
  3760. }
  3761. /**
  3762. * Add a where not exists clause to the query.
  3763. *
  3764. * @param \Closure $callback
  3765. * @param string $boolean
  3766. * @return \Illuminate\Database\Query\Builder|static
  3767. * @static
  3768. */
  3769. public static function whereNotExists($callback, $boolean = 'and'){
  3770. return \Illuminate\Database\Query\Builder::whereNotExists($callback, $boolean);
  3771. }
  3772. /**
  3773. * Add a where not exists clause to the query.
  3774. *
  3775. * @param \Closure $callback
  3776. * @return \Illuminate\Database\Query\Builder|static
  3777. * @static
  3778. */
  3779. public static function orWhereNotExists($callback){
  3780. return \Illuminate\Database\Query\Builder::orWhereNotExists($callback);
  3781. }
  3782. /**
  3783. * Add a "where in" clause to the query.
  3784. *
  3785. * @param string $column
  3786. * @param mixed $values
  3787. * @param string $boolean
  3788. * @param bool $not
  3789. * @return $this
  3790. * @static
  3791. */
  3792. public static function whereIn($column, $values, $boolean = 'and', $not = false){
  3793. return \Illuminate\Database\Query\Builder::whereIn($column, $values, $boolean, $not);
  3794. }
  3795. /**
  3796. * Add an "or where in" clause to the query.
  3797. *
  3798. * @param string $column
  3799. * @param mixed $values
  3800. * @return \Illuminate\Database\Query\Builder|static
  3801. * @static
  3802. */
  3803. public static function orWhereIn($column, $values){
  3804. return \Illuminate\Database\Query\Builder::orWhereIn($column, $values);
  3805. }
  3806. /**
  3807. * Add a "where not in" clause to the query.
  3808. *
  3809. * @param string $column
  3810. * @param mixed $values
  3811. * @param string $boolean
  3812. * @return \Illuminate\Database\Query\Builder|static
  3813. * @static
  3814. */
  3815. public static function whereNotIn($column, $values, $boolean = 'and'){
  3816. return \Illuminate\Database\Query\Builder::whereNotIn($column, $values, $boolean);
  3817. }
  3818. /**
  3819. * Add an "or where not in" clause to the query.
  3820. *
  3821. * @param string $column
  3822. * @param mixed $values
  3823. * @return \Illuminate\Database\Query\Builder|static
  3824. * @static
  3825. */
  3826. public static function orWhereNotIn($column, $values){
  3827. return \Illuminate\Database\Query\Builder::orWhereNotIn($column, $values);
  3828. }
  3829. /**
  3830. * Add a "where null" clause to the query.
  3831. *
  3832. * @param string $column
  3833. * @param string $boolean
  3834. * @param bool $not
  3835. * @return $this
  3836. * @static
  3837. */
  3838. public static function whereNull($column, $boolean = 'and', $not = false){
  3839. return \Illuminate\Database\Query\Builder::whereNull($column, $boolean, $not);
  3840. }
  3841. /**
  3842. * Add an "or where null" clause to the query.
  3843. *
  3844. * @param string $column
  3845. * @return \Illuminate\Database\Query\Builder|static
  3846. * @static
  3847. */
  3848. public static function orWhereNull($column){
  3849. return \Illuminate\Database\Query\Builder::orWhereNull($column);
  3850. }
  3851. /**
  3852. * Add a "where not null" clause to the query.
  3853. *
  3854. * @param string $column
  3855. * @param string $boolean
  3856. * @return \Illuminate\Database\Query\Builder|static
  3857. * @static
  3858. */
  3859. public static function whereNotNull($column, $boolean = 'and'){
  3860. return \Illuminate\Database\Query\Builder::whereNotNull($column, $boolean);
  3861. }
  3862. /**
  3863. * Add an "or where not null" clause to the query.
  3864. *
  3865. * @param string $column
  3866. * @return \Illuminate\Database\Query\Builder|static
  3867. * @static
  3868. */
  3869. public static function orWhereNotNull($column){
  3870. return \Illuminate\Database\Query\Builder::orWhereNotNull($column);
  3871. }
  3872. /**
  3873. * Add a "where day" statement to the query.
  3874. *
  3875. * @param string $column
  3876. * @param string $operator
  3877. * @param int $value
  3878. * @param string $boolean
  3879. * @return \Illuminate\Database\Query\Builder|static
  3880. * @static
  3881. */
  3882. public static function whereDay($column, $operator, $value, $boolean = 'and'){
  3883. return \Illuminate\Database\Query\Builder::whereDay($column, $operator, $value, $boolean);
  3884. }
  3885. /**
  3886. * Add a "where month" statement to the query.
  3887. *
  3888. * @param string $column
  3889. * @param string $operator
  3890. * @param int $value
  3891. * @param string $boolean
  3892. * @return \Illuminate\Database\Query\Builder|static
  3893. * @static
  3894. */
  3895. public static function whereMonth($column, $operator, $value, $boolean = 'and'){
  3896. return \Illuminate\Database\Query\Builder::whereMonth($column, $operator, $value, $boolean);
  3897. }
  3898. /**
  3899. * Add a "where year" statement to the query.
  3900. *
  3901. * @param string $column
  3902. * @param string $operator
  3903. * @param int $value
  3904. * @param string $boolean
  3905. * @return \Illuminate\Database\Query\Builder|static
  3906. * @static
  3907. */
  3908. public static function whereYear($column, $operator, $value, $boolean = 'and'){
  3909. return \Illuminate\Database\Query\Builder::whereYear($column, $operator, $value, $boolean);
  3910. }
  3911. /**
  3912. * Handles dynamic "where" clauses to the query.
  3913. *
  3914. * @param string $method
  3915. * @param string $parameters
  3916. * @return $this
  3917. * @static
  3918. */
  3919. public static function dynamicWhere($method, $parameters){
  3920. return \Illuminate\Database\Query\Builder::dynamicWhere($method, $parameters);
  3921. }
  3922. /**
  3923. * Add a "group by" clause to the query.
  3924. *
  3925. * @param array|string $column,...
  3926. * @return $this
  3927. * @static
  3928. */
  3929. public static function groupBy(){
  3930. return \Illuminate\Database\Query\Builder::groupBy();
  3931. }
  3932. /**
  3933. * Add a "having" clause to the query.
  3934. *
  3935. * @param string $column
  3936. * @param string $operator
  3937. * @param string $value
  3938. * @param string $boolean
  3939. * @return $this
  3940. * @static
  3941. */
  3942. public static function having($column, $operator = null, $value = null, $boolean = 'and'){
  3943. return \Illuminate\Database\Query\Builder::having($column, $operator, $value, $boolean);
  3944. }
  3945. /**
  3946. * Add a "or having" clause to the query.
  3947. *
  3948. * @param string $column
  3949. * @param string $operator
  3950. * @param string $value
  3951. * @return \Illuminate\Database\Query\Builder|static
  3952. * @static
  3953. */
  3954. public static function orHaving($column, $operator = null, $value = null){
  3955. return \Illuminate\Database\Query\Builder::orHaving($column, $operator, $value);
  3956. }
  3957. /**
  3958. * Add a raw having clause to the query.
  3959. *
  3960. * @param string $sql
  3961. * @param array $bindings
  3962. * @param string $boolean
  3963. * @return $this
  3964. * @static
  3965. */
  3966. public static function havingRaw($sql, $bindings = array(), $boolean = 'and'){
  3967. return \Illuminate\Database\Query\Builder::havingRaw($sql, $bindings, $boolean);
  3968. }
  3969. /**
  3970. * Add a raw or having clause to the query.
  3971. *
  3972. * @param string $sql
  3973. * @param array $bindings
  3974. * @return \Illuminate\Database\Query\Builder|static
  3975. * @static
  3976. */
  3977. public static function orHavingRaw($sql, $bindings = array()){
  3978. return \Illuminate\Database\Query\Builder::orHavingRaw($sql, $bindings);
  3979. }
  3980. /**
  3981. * Add an "order by" clause to the query.
  3982. *
  3983. * @param string $column
  3984. * @param string $direction
  3985. * @return $this
  3986. * @static
  3987. */
  3988. public static function orderBy($column, $direction = 'asc'){
  3989. return \Illuminate\Database\Query\Builder::orderBy($column, $direction);
  3990. }
  3991. /**
  3992. * Add an "order by" clause for a timestamp to the query.
  3993. *
  3994. * @param string $column
  3995. * @return \Illuminate\Database\Query\Builder|static
  3996. * @static
  3997. */
  3998. public static function latest($column = 'created_at'){
  3999. return \Illuminate\Database\Query\Builder::latest($column);
  4000. }
  4001. /**
  4002. * Add an "order by" clause for a timestamp to the query.
  4003. *
  4004. * @param string $column
  4005. * @return \Illuminate\Database\Query\Builder|static
  4006. * @static
  4007. */
  4008. public static function oldest($column = 'created_at'){
  4009. return \Illuminate\Database\Query\Builder::oldest($column);
  4010. }
  4011. /**
  4012. * Add a raw "order by" clause to the query.
  4013. *
  4014. * @param string $sql
  4015. * @param array $bindings
  4016. * @return $this
  4017. * @static
  4018. */
  4019. public static function orderByRaw($sql, $bindings = array()){
  4020. return \Illuminate\Database\Query\Builder::orderByRaw($sql, $bindings);
  4021. }
  4022. /**
  4023. * Set the "offset" value of the query.
  4024. *
  4025. * @param int $value
  4026. * @return $this
  4027. * @static
  4028. */
  4029. public static function offset($value){
  4030. return \Illuminate\Database\Query\Builder::offset($value);
  4031. }
  4032. /**
  4033. * Alias to set the "offset" value of the query.
  4034. *
  4035. * @param int $value
  4036. * @return \Illuminate\Database\Query\Builder|static
  4037. * @static
  4038. */
  4039. public static function skip($value){
  4040. return \Illuminate\Database\Query\Builder::skip($value);
  4041. }
  4042. /**
  4043. * Set the "limit" value of the query.
  4044. *
  4045. * @param int $value
  4046. * @return $this
  4047. * @static
  4048. */
  4049. public static function limit($value){
  4050. return \Illuminate\Database\Query\Builder::limit($value);
  4051. }
  4052. /**
  4053. * Alias to set the "limit" value of the query.
  4054. *
  4055. * @param int $value
  4056. * @return \Illuminate\Database\Query\Builder|static
  4057. * @static
  4058. */
  4059. public static function take($value){
  4060. return \Illuminate\Database\Query\Builder::take($value);
  4061. }
  4062. /**
  4063. * Set the limit and offset for a given page.
  4064. *
  4065. * @param int $page
  4066. * @param int $perPage
  4067. * @return \Illuminate\Database\Query\Builder|static
  4068. * @static
  4069. */
  4070. public static function forPage($page, $perPage = 15){
  4071. return \Illuminate\Database\Query\Builder::forPage($page, $perPage);
  4072. }
  4073. /**
  4074. * Add a union statement to the query.
  4075. *
  4076. * @param \Illuminate\Database\Query\Builder|\Closure $query
  4077. * @param bool $all
  4078. * @return \Illuminate\Database\Query\Builder|static
  4079. * @static
  4080. */
  4081. public static function union($query, $all = false){
  4082. return \Illuminate\Database\Query\Builder::union($query, $all);
  4083. }
  4084. /**
  4085. * Add a union all statement to the query.
  4086. *
  4087. * @param \Illuminate\Database\Query\Builder|\Closure $query
  4088. * @return \Illuminate\Database\Query\Builder|static
  4089. * @static
  4090. */
  4091. public static function unionAll($query){
  4092. return \Illuminate\Database\Query\Builder::unionAll($query);
  4093. }
  4094. /**
  4095. * Lock the selected rows in the table.
  4096. *
  4097. * @param bool $value
  4098. * @return $this
  4099. * @static
  4100. */
  4101. public static function lock($value = true){
  4102. return \Illuminate\Database\Query\Builder::lock($value);
  4103. }
  4104. /**
  4105. * Lock the selected rows in the table for updating.
  4106. *
  4107. * @return \Illuminate\Database\Query\Builder
  4108. * @static
  4109. */
  4110. public static function lockForUpdate(){
  4111. return \Illuminate\Database\Query\Builder::lockForUpdate();
  4112. }
  4113. /**
  4114. * Share lock the selected rows in the table.
  4115. *
  4116. * @return \Illuminate\Database\Query\Builder
  4117. * @static
  4118. */
  4119. public static function sharedLock(){
  4120. return \Illuminate\Database\Query\Builder::sharedLock();
  4121. }
  4122. /**
  4123. * Get the SQL representation of the query.
  4124. *
  4125. * @return string
  4126. * @static
  4127. */
  4128. public static function toSql(){
  4129. return \Illuminate\Database\Query\Builder::toSql();
  4130. }
  4131. /**
  4132. * Indicate that the query results should be cached.
  4133. *
  4134. * @param \DateTime|int $minutes
  4135. * @param string $key
  4136. * @return $this
  4137. * @static
  4138. */
  4139. public static function remember($minutes, $key = null){
  4140. return \Illuminate\Database\Query\Builder::remember($minutes, $key);
  4141. }
  4142. /**
  4143. * Indicate that the query results should be cached forever.
  4144. *
  4145. * @param string $key
  4146. * @return \Illuminate\Database\Query\Builder|static
  4147. * @static
  4148. */
  4149. public static function rememberForever($key = null){
  4150. return \Illuminate\Database\Query\Builder::rememberForever($key);
  4151. }
  4152. /**
  4153. * Indicate that the results, if cached, should use the given cache tags.
  4154. *
  4155. * @param array|mixed $cacheTags
  4156. * @return $this
  4157. * @static
  4158. */
  4159. public static function cacheTags($cacheTags){
  4160. return \Illuminate\Database\Query\Builder::cacheTags($cacheTags);
  4161. }
  4162. /**
  4163. * Indicate that the results, if cached, should use the given cache driver.
  4164. *
  4165. * @param string $cacheDriver
  4166. * @return $this
  4167. * @static
  4168. */
  4169. public static function cacheDriver($cacheDriver){
  4170. return \Illuminate\Database\Query\Builder::cacheDriver($cacheDriver);
  4171. }
  4172. /**
  4173. * Execute the query as a fresh "select" statement.
  4174. *
  4175. * @param array $columns
  4176. * @return array|static[]
  4177. * @static
  4178. */
  4179. public static function getFresh($columns = array()){
  4180. return \Illuminate\Database\Query\Builder::getFresh($columns);
  4181. }
  4182. /**
  4183. * Execute the query as a cached "select" statement.
  4184. *
  4185. * @param array $columns
  4186. * @return array
  4187. * @static
  4188. */
  4189. public static function getCached($columns = array()){
  4190. return \Illuminate\Database\Query\Builder::getCached($columns);
  4191. }
  4192. /**
  4193. * Get a unique cache key for the complete query.
  4194. *
  4195. * @return string
  4196. * @static
  4197. */
  4198. public static function getCacheKey(){
  4199. return \Illuminate\Database\Query\Builder::getCacheKey();
  4200. }
  4201. /**
  4202. * Generate the unique cache key for the query.
  4203. *
  4204. * @return string
  4205. * @static
  4206. */
  4207. public static function generateCacheKey(){
  4208. return \Illuminate\Database\Query\Builder::generateCacheKey();
  4209. }
  4210. /**
  4211. * Concatenate values of a given column as a string.
  4212. *
  4213. * @param string $column
  4214. * @param string $glue
  4215. * @return string
  4216. * @static
  4217. */
  4218. public static function implode($column, $glue = null){
  4219. return \Illuminate\Database\Query\Builder::implode($column, $glue);
  4220. }
  4221. /**
  4222. * Build a paginator instance from a raw result array.
  4223. *
  4224. * @param \Illuminate\Pagination\Factory $paginator
  4225. * @param array $results
  4226. * @param int $perPage
  4227. * @return \Illuminate\Pagination\Paginator
  4228. * @static
  4229. */
  4230. public static function buildRawPaginator($paginator, $results, $perPage){
  4231. return \Illuminate\Database\Query\Builder::buildRawPaginator($paginator, $results, $perPage);
  4232. }
  4233. /**
  4234. * Get the count of the total records for pagination.
  4235. *
  4236. * @return int
  4237. * @static
  4238. */
  4239. public static function getPaginationCount(){
  4240. return \Illuminate\Database\Query\Builder::getPaginationCount();
  4241. }
  4242. /**
  4243. * Determine if any rows exist for the current query.
  4244. *
  4245. * @return bool
  4246. * @static
  4247. */
  4248. public static function exists(){
  4249. return \Illuminate\Database\Query\Builder::exists();
  4250. }
  4251. /**
  4252. * Retrieve the "count" result of the query.
  4253. *
  4254. * @param string $columns
  4255. * @return int
  4256. * @static
  4257. */
  4258. public static function count($columns = '*'){
  4259. return \Illuminate\Database\Query\Builder::count($columns);
  4260. }
  4261. /**
  4262. * Retrieve the minimum value of a given column.
  4263. *
  4264. * @param string $column
  4265. * @return mixed
  4266. * @static
  4267. */
  4268. public static function min($column){
  4269. return \Illuminate\Database\Query\Builder::min($column);
  4270. }
  4271. /**
  4272. * Retrieve the maximum value of a given column.
  4273. *
  4274. * @param string $column
  4275. * @return mixed
  4276. * @static
  4277. */
  4278. public static function max($column){
  4279. return \Illuminate\Database\Query\Builder::max($column);
  4280. }
  4281. /**
  4282. * Retrieve the sum of the values of a given column.
  4283. *
  4284. * @param string $column
  4285. * @return mixed
  4286. * @static
  4287. */
  4288. public static function sum($column){
  4289. return \Illuminate\Database\Query\Builder::sum($column);
  4290. }
  4291. /**
  4292. * Retrieve the average of the values of a given column.
  4293. *
  4294. * @param string $column
  4295. * @return mixed
  4296. * @static
  4297. */
  4298. public static function avg($column){
  4299. return \Illuminate\Database\Query\Builder::avg($column);
  4300. }
  4301. /**
  4302. * Execute an aggregate function on the database.
  4303. *
  4304. * @param string $function
  4305. * @param array $columns
  4306. * @return mixed
  4307. * @static
  4308. */
  4309. public static function aggregate($function, $columns = array()){
  4310. return \Illuminate\Database\Query\Builder::aggregate($function, $columns);
  4311. }
  4312. /**
  4313. * Insert a new record into the database.
  4314. *
  4315. * @param array $values
  4316. * @return bool
  4317. * @static
  4318. */
  4319. public static function insert($values){
  4320. return \Illuminate\Database\Query\Builder::insert($values);
  4321. }
  4322. /**
  4323. * Insert a new record and get the value of the primary key.
  4324. *
  4325. * @param array $values
  4326. * @param string $sequence
  4327. * @return int
  4328. * @static
  4329. */
  4330. public static function insertGetId($values, $sequence = null){
  4331. return \Illuminate\Database\Query\Builder::insertGetId($values, $sequence);
  4332. }
  4333. /**
  4334. * Run a truncate statement on the table.
  4335. *
  4336. * @return void
  4337. * @static
  4338. */
  4339. public static function truncate(){
  4340. \Illuminate\Database\Query\Builder::truncate();
  4341. }
  4342. /**
  4343. * Merge an array of where clauses and bindings.
  4344. *
  4345. * @param array $wheres
  4346. * @param array $bindings
  4347. * @return void
  4348. * @static
  4349. */
  4350. public static function mergeWheres($wheres, $bindings){
  4351. \Illuminate\Database\Query\Builder::mergeWheres($wheres, $bindings);
  4352. }
  4353. /**
  4354. * Create a raw database expression.
  4355. *
  4356. * @param mixed $value
  4357. * @return \Illuminate\Database\Query\Expression
  4358. * @static
  4359. */
  4360. public static function raw($value){
  4361. return \Illuminate\Database\Query\Builder::raw($value);
  4362. }
  4363. /**
  4364. * Get the current query value bindings in a flattened array.
  4365. *
  4366. * @return array
  4367. * @static
  4368. */
  4369. public static function getBindings(){
  4370. return \Illuminate\Database\Query\Builder::getBindings();
  4371. }
  4372. /**
  4373. * Get the raw array of bindings.
  4374. *
  4375. * @return array
  4376. * @static
  4377. */
  4378. public static function getRawBindings(){
  4379. return \Illuminate\Database\Query\Builder::getRawBindings();
  4380. }
  4381. /**
  4382. * Set the bindings on the query builder.
  4383. *
  4384. * @param array $bindings
  4385. * @param string $type
  4386. * @return $this
  4387. * @throws \InvalidArgumentException
  4388. * @static
  4389. */
  4390. public static function setBindings($bindings, $type = 'where'){
  4391. return \Illuminate\Database\Query\Builder::setBindings($bindings, $type);
  4392. }
  4393. /**
  4394. * Add a binding to the query.
  4395. *
  4396. * @param mixed $value
  4397. * @param string $type
  4398. * @return $this
  4399. * @throws \InvalidArgumentException
  4400. * @static
  4401. */
  4402. public static function addBinding($value, $type = 'where'){
  4403. return \Illuminate\Database\Query\Builder::addBinding($value, $type);
  4404. }
  4405. /**
  4406. * Merge an array of bindings into our bindings.
  4407. *
  4408. * @param \Illuminate\Database\Query\Builder $query
  4409. * @return $this
  4410. * @static
  4411. */
  4412. public static function mergeBindings($query){
  4413. return \Illuminate\Database\Query\Builder::mergeBindings($query);
  4414. }
  4415. /**
  4416. * Get the database query processor instance.
  4417. *
  4418. * @return \Illuminate\Database\Query\Processors\Processor
  4419. * @static
  4420. */
  4421. public static function getProcessor(){
  4422. return \Illuminate\Database\Query\Builder::getProcessor();
  4423. }
  4424. /**
  4425. * Get the query grammar instance.
  4426. *
  4427. * @return \Illuminate\Database\Grammar
  4428. * @static
  4429. */
  4430. public static function getGrammar(){
  4431. return \Illuminate\Database\Query\Builder::getGrammar();
  4432. }
  4433. /**
  4434. * Use the write pdo for query.
  4435. *
  4436. * @return $this
  4437. * @static
  4438. */
  4439. public static function useWritePdo(){
  4440. return \Illuminate\Database\Query\Builder::useWritePdo();
  4441. }
  4442. }
  4443. class Event extends \Illuminate\Support\Facades\Event{
  4444. /**
  4445. * Register an event listener with the dispatcher.
  4446. *
  4447. * @param string|array $events
  4448. * @param mixed $listener
  4449. * @param int $priority
  4450. * @return void
  4451. * @static
  4452. */
  4453. public static function listen($events, $listener, $priority = 0){
  4454. \Illuminate\Events\Dispatcher::listen($events, $listener, $priority);
  4455. }
  4456. /**
  4457. * Determine if a given event has listeners.
  4458. *
  4459. * @param string $eventName
  4460. * @return bool
  4461. * @static
  4462. */
  4463. public static function hasListeners($eventName){
  4464. return \Illuminate\Events\Dispatcher::hasListeners($eventName);
  4465. }
  4466. /**
  4467. * Register a queued event and payload.
  4468. *
  4469. * @param string $event
  4470. * @param array $payload
  4471. * @return void
  4472. * @static
  4473. */
  4474. public static function queue($event, $payload = array()){
  4475. \Illuminate\Events\Dispatcher::queue($event, $payload);
  4476. }
  4477. /**
  4478. * Register an event subscriber with the dispatcher.
  4479. *
  4480. * @param string $subscriber
  4481. * @return void
  4482. * @static
  4483. */
  4484. public static function subscribe($subscriber){
  4485. \Illuminate\Events\Dispatcher::subscribe($subscriber);
  4486. }
  4487. /**
  4488. * Fire an event until the first non-null response is returned.
  4489. *
  4490. * @param string $event
  4491. * @param array $payload
  4492. * @return mixed
  4493. * @static
  4494. */
  4495. public static function until($event, $payload = array()){
  4496. return \Illuminate\Events\Dispatcher::until($event, $payload);
  4497. }
  4498. /**
  4499. * Flush a set of queued events.
  4500. *
  4501. * @param string $event
  4502. * @return void
  4503. * @static
  4504. */
  4505. public static function flush($event){
  4506. \Illuminate\Events\Dispatcher::flush($event);
  4507. }
  4508. /**
  4509. * Get the event that is currently firing.
  4510. *
  4511. * @return string
  4512. * @static
  4513. */
  4514. public static function firing(){
  4515. return \Illuminate\Events\Dispatcher::firing();
  4516. }
  4517. /**
  4518. * Fire an event and call the listeners.
  4519. *
  4520. * @param string $event
  4521. * @param mixed $payload
  4522. * @param bool $halt
  4523. * @return array|null
  4524. * @static
  4525. */
  4526. public static function fire($event, $payload = array(), $halt = false){
  4527. return \Illuminate\Events\Dispatcher::fire($event, $payload, $halt);
  4528. }
  4529. /**
  4530. * Get all of the listeners for a given event name.
  4531. *
  4532. * @param string $eventName
  4533. * @return array
  4534. * @static
  4535. */
  4536. public static function getListeners($eventName){
  4537. return \Illuminate\Events\Dispatcher::getListeners($eventName);
  4538. }
  4539. /**
  4540. * Register an event listener with the dispatcher.
  4541. *
  4542. * @param mixed $listener
  4543. * @return mixed
  4544. * @static
  4545. */
  4546. public static function makeListener($listener){
  4547. return \Illuminate\Events\Dispatcher::makeListener($listener);
  4548. }
  4549. /**
  4550. * Create a class based listener using the IoC container.
  4551. *
  4552. * @param mixed $listener
  4553. * @return \Closure
  4554. * @static
  4555. */
  4556. public static function createClassListener($listener){
  4557. return \Illuminate\Events\Dispatcher::createClassListener($listener);
  4558. }
  4559. /**
  4560. * Remove a set of listeners from the dispatcher.
  4561. *
  4562. * @param string $event
  4563. * @return void
  4564. * @static
  4565. */
  4566. public static function forget($event){
  4567. \Illuminate\Events\Dispatcher::forget($event);
  4568. }
  4569. /**
  4570. * Forget all of the queued listeners.
  4571. *
  4572. * @return void
  4573. * @static
  4574. */
  4575. public static function forgetQueued(){
  4576. \Illuminate\Events\Dispatcher::forgetQueued();
  4577. }
  4578. }
  4579. class File extends \Illuminate\Support\Facades\File{
  4580. /**
  4581. * Determine if a file exists.
  4582. *
  4583. * @param string $path
  4584. * @return bool
  4585. * @static
  4586. */
  4587. public static function exists($path){
  4588. return \Illuminate\Filesystem\Filesystem::exists($path);
  4589. }
  4590. /**
  4591. * Get the contents of a file.
  4592. *
  4593. * @param string $path
  4594. * @return string
  4595. * @throws FileNotFoundException
  4596. * @static
  4597. */
  4598. public static function get($path){
  4599. return \Illuminate\Filesystem\Filesystem::get($path);
  4600. }
  4601. /**
  4602. * Get the returned value of a file.
  4603. *
  4604. * @param string $path
  4605. * @return mixed
  4606. * @throws FileNotFoundException
  4607. * @static
  4608. */
  4609. public static function getRequire($path){
  4610. return \Illuminate\Filesystem\Filesystem::getRequire($path);
  4611. }
  4612. /**
  4613. * Require the given file once.
  4614. *
  4615. * @param string $file
  4616. * @return mixed
  4617. * @static
  4618. */
  4619. public static function requireOnce($file){
  4620. return \Illuminate\Filesystem\Filesystem::requireOnce($file);
  4621. }
  4622. /**
  4623. * Write the contents of a file.
  4624. *
  4625. * @param string $path
  4626. * @param string $contents
  4627. * @return int
  4628. * @static
  4629. */
  4630. public static function put($path, $contents){
  4631. return \Illuminate\Filesystem\Filesystem::put($path, $contents);
  4632. }
  4633. /**
  4634. * Prepend to a file.
  4635. *
  4636. * @param string $path
  4637. * @param string $data
  4638. * @return int
  4639. * @static
  4640. */
  4641. public static function prepend($path, $data){
  4642. return \Illuminate\Filesystem\Filesystem::prepend($path, $data);
  4643. }
  4644. /**
  4645. * Append to a file.
  4646. *
  4647. * @param string $path
  4648. * @param string $data
  4649. * @return int
  4650. * @static
  4651. */
  4652. public static function append($path, $data){
  4653. return \Illuminate\Filesystem\Filesystem::append($path, $data);
  4654. }
  4655. /**
  4656. * Delete the file at a given path.
  4657. *
  4658. * @param string|array $paths
  4659. * @return bool
  4660. * @static
  4661. */
  4662. public static function delete($paths){
  4663. return \Illuminate\Filesystem\Filesystem::delete($paths);
  4664. }
  4665. /**
  4666. * Move a file to a new location.
  4667. *
  4668. * @param string $path
  4669. * @param string $target
  4670. * @return bool
  4671. * @static
  4672. */
  4673. public static function move($path, $target){
  4674. return \Illuminate\Filesystem\Filesystem::move($path, $target);
  4675. }
  4676. /**
  4677. * Copy a file to a new location.
  4678. *
  4679. * @param string $path
  4680. * @param string $target
  4681. * @return bool
  4682. * @static
  4683. */
  4684. public static function copy($path, $target){
  4685. return \Illuminate\Filesystem\Filesystem::copy($path, $target);
  4686. }
  4687. /**
  4688. * Extract the file name from a file path.
  4689. *
  4690. * @param string $path
  4691. * @return string
  4692. * @static
  4693. */
  4694. public static function name($path){
  4695. return \Illuminate\Filesystem\Filesystem::name($path);
  4696. }
  4697. /**
  4698. * Extract the file extension from a file path.
  4699. *
  4700. * @param string $path
  4701. * @return string
  4702. * @static
  4703. */
  4704. public static function extension($path){
  4705. return \Illuminate\Filesystem\Filesystem::extension($path);
  4706. }
  4707. /**
  4708. * Get the file type of a given file.
  4709. *
  4710. * @param string $path
  4711. * @return string
  4712. * @static
  4713. */
  4714. public static function type($path){
  4715. return \Illuminate\Filesystem\Filesystem::type($path);
  4716. }
  4717. /**
  4718. * Get the file size of a given file.
  4719. *
  4720. * @param string $path
  4721. * @return int
  4722. * @static
  4723. */
  4724. public static function size($path){
  4725. return \Illuminate\Filesystem\Filesystem::size($path);
  4726. }
  4727. /**
  4728. * Get the file's last modification time.
  4729. *
  4730. * @param string $path
  4731. * @return int
  4732. * @static
  4733. */
  4734. public static function lastModified($path){
  4735. return \Illuminate\Filesystem\Filesystem::lastModified($path);
  4736. }
  4737. /**
  4738. * Determine if the given path is a directory.
  4739. *
  4740. * @param string $directory
  4741. * @return bool
  4742. * @static
  4743. */
  4744. public static function isDirectory($directory){
  4745. return \Illuminate\Filesystem\Filesystem::isDirectory($directory);
  4746. }
  4747. /**
  4748. * Determine if the given path is writable.
  4749. *
  4750. * @param string $path
  4751. * @return bool
  4752. * @static
  4753. */
  4754. public static function isWritable($path){
  4755. return \Illuminate\Filesystem\Filesystem::isWritable($path);
  4756. }
  4757. /**
  4758. * Determine if the given path is a file.
  4759. *
  4760. * @param string $file
  4761. * @return bool
  4762. * @static
  4763. */
  4764. public static function isFile($file){
  4765. return \Illuminate\Filesystem\Filesystem::isFile($file);
  4766. }
  4767. /**
  4768. * Find path names matching a given pattern.
  4769. *
  4770. * @param string $pattern
  4771. * @param int $flags
  4772. * @return array
  4773. * @static
  4774. */
  4775. public static function glob($pattern, $flags = 0){
  4776. return \Illuminate\Filesystem\Filesystem::glob($pattern, $flags);
  4777. }
  4778. /**
  4779. * Get an array of all files in a directory.
  4780. *
  4781. * @param string $directory
  4782. * @return array
  4783. * @static
  4784. */
  4785. public static function files($directory){
  4786. return \Illuminate\Filesystem\Filesystem::files($directory);
  4787. }
  4788. /**
  4789. * Get all of the files from the given directory (recursive).
  4790. *
  4791. * @param string $directory
  4792. * @return array
  4793. * @static
  4794. */
  4795. public static function allFiles($directory){
  4796. return \Illuminate\Filesystem\Filesystem::allFiles($directory);
  4797. }
  4798. /**
  4799. * Get all of the directories within a given directory.
  4800. *
  4801. * @param string $directory
  4802. * @return array
  4803. * @static
  4804. */
  4805. public static function directories($directory){
  4806. return \Illuminate\Filesystem\Filesystem::directories($directory);
  4807. }
  4808. /**
  4809. * Create a directory.
  4810. *
  4811. * @param string $path
  4812. * @param int $mode
  4813. * @param bool $recursive
  4814. * @param bool $force
  4815. * @return bool
  4816. * @static
  4817. */
  4818. public static function makeDirectory($path, $mode = 493, $recursive = false, $force = false){
  4819. return \Illuminate\Filesystem\Filesystem::makeDirectory($path, $mode, $recursive, $force);
  4820. }
  4821. /**
  4822. * Copy a directory from one location to another.
  4823. *
  4824. * @param string $directory
  4825. * @param string $destination
  4826. * @param int $options
  4827. * @return bool
  4828. * @static
  4829. */
  4830. public static function copyDirectory($directory, $destination, $options = null){
  4831. return \Illuminate\Filesystem\Filesystem::copyDirectory($directory, $destination, $options);
  4832. }
  4833. /**
  4834. * Recursively delete a directory.
  4835. *
  4836. * The directory itself may be optionally preserved.
  4837. *
  4838. * @param string $directory
  4839. * @param bool $preserve
  4840. * @return bool
  4841. * @static
  4842. */
  4843. public static function deleteDirectory($directory, $preserve = false){
  4844. return \Illuminate\Filesystem\Filesystem::deleteDirectory($directory, $preserve);
  4845. }
  4846. /**
  4847. * Empty the specified directory of all files and folders.
  4848. *
  4849. * @param string $directory
  4850. * @return bool
  4851. * @static
  4852. */
  4853. public static function cleanDirectory($directory){
  4854. return \Illuminate\Filesystem\Filesystem::cleanDirectory($directory);
  4855. }
  4856. }
  4857. class Form extends \Illuminate\Support\Facades\Form{
  4858. /**
  4859. * Open up a new HTML form.
  4860. *
  4861. * @param array $options
  4862. * @return string
  4863. * @static
  4864. */
  4865. public static function open($options = array()){
  4866. return \Illuminate\Html\FormBuilder::open($options);
  4867. }
  4868. /**
  4869. * Create a new model based form builder.
  4870. *
  4871. * @param mixed $model
  4872. * @param array $options
  4873. * @return string
  4874. * @static
  4875. */
  4876. public static function model($model, $options = array()){
  4877. return \Illuminate\Html\FormBuilder::model($model, $options);
  4878. }
  4879. /**
  4880. * Set the model instance on the form builder.
  4881. *
  4882. * @param mixed $model
  4883. * @return void
  4884. * @static
  4885. */
  4886. public static function setModel($model){
  4887. \Illuminate\Html\FormBuilder::setModel($model);
  4888. }
  4889. /**
  4890. * Close the current form.
  4891. *
  4892. * @return string
  4893. * @static
  4894. */
  4895. public static function close(){
  4896. return \Illuminate\Html\FormBuilder::close();
  4897. }
  4898. /**
  4899. * Generate a hidden field with the current CSRF token.
  4900. *
  4901. * @return string
  4902. * @static
  4903. */
  4904. public static function token(){
  4905. return \Illuminate\Html\FormBuilder::token();
  4906. }
  4907. /**
  4908. * Create a form label element.
  4909. *
  4910. * @param string $name
  4911. * @param string $value
  4912. * @param array $options
  4913. * @return string
  4914. * @static
  4915. */
  4916. public static function label($name, $value = null, $options = array()){
  4917. return \Illuminate\Html\FormBuilder::label($name, $value, $options);
  4918. }
  4919. /**
  4920. * Create a form input field.
  4921. *
  4922. * @param string $type
  4923. * @param string $name
  4924. * @param string $value
  4925. * @param array $options
  4926. * @return string
  4927. * @static
  4928. */
  4929. public static function input($type, $name, $value = null, $options = array()){
  4930. return \Illuminate\Html\FormBuilder::input($type, $name, $value, $options);
  4931. }
  4932. /**
  4933. * Create a text input field.
  4934. *
  4935. * @param string $name
  4936. * @param string $value
  4937. * @param array $options
  4938. * @return string
  4939. * @static
  4940. */
  4941. public static function text($name, $value = null, $options = array()){
  4942. return \Illuminate\Html\FormBuilder::text($name, $value, $options);
  4943. }
  4944. /**
  4945. * Create a password input field.
  4946. *
  4947. * @param string $name
  4948. * @param array $options
  4949. * @return string
  4950. * @static
  4951. */
  4952. public static function password($name, $options = array()){
  4953. return \Illuminate\Html\FormBuilder::password($name, $options);
  4954. }
  4955. /**
  4956. * Create a hidden input field.
  4957. *
  4958. * @param string $name
  4959. * @param string $value
  4960. * @param array $options
  4961. * @return string
  4962. * @static
  4963. */
  4964. public static function hidden($name, $value = null, $options = array()){
  4965. return \Illuminate\Html\FormBuilder::hidden($name, $value, $options);
  4966. }
  4967. /**
  4968. * Create an e-mail input field.
  4969. *
  4970. * @param string $name
  4971. * @param string $value
  4972. * @param array $options
  4973. * @return string
  4974. * @static
  4975. */
  4976. public static function email($name, $value = null, $options = array()){
  4977. return \Illuminate\Html\FormBuilder::email($name, $value, $options);
  4978. }
  4979. /**
  4980. * Create a url input field.
  4981. *
  4982. * @param string $name
  4983. * @param string $value
  4984. * @param array $options
  4985. * @return string
  4986. * @static
  4987. */
  4988. public static function url($name, $value = null, $options = array()){
  4989. return \Illuminate\Html\FormBuilder::url($name, $value, $options);
  4990. }
  4991. /**
  4992. * Create a file input field.
  4993. *
  4994. * @param string $name
  4995. * @param array $options
  4996. * @return string
  4997. * @static
  4998. */
  4999. public static function file($name, $options = array()){
  5000. return \Illuminate\Html\FormBuilder::file($name, $options);
  5001. }
  5002. /**
  5003. * Create a textarea input field.
  5004. *
  5005. * @param string $name
  5006. * @param string $value
  5007. * @param array $options
  5008. * @return string
  5009. * @static
  5010. */
  5011. public static function textarea($name, $value = null, $options = array()){
  5012. return \Illuminate\Html\FormBuilder::textarea($name, $value, $options);
  5013. }
  5014. /**
  5015. * Create a number input field.
  5016. *
  5017. * @param string $name
  5018. * @param array $options
  5019. * @return string
  5020. * @static
  5021. */
  5022. public static function number($name, $value = null, $options = array()){
  5023. return \Illuminate\Html\FormBuilder::number($name, $value, $options);
  5024. }
  5025. /**
  5026. * Create a select box field.
  5027. *
  5028. * @param string $name
  5029. * @param array $list
  5030. * @param string $selected
  5031. * @param array $options
  5032. * @return string
  5033. * @static
  5034. */
  5035. public static function select($name, $list = array(), $selected = null, $options = array()){
  5036. return \Illuminate\Html\FormBuilder::select($name, $list, $selected, $options);
  5037. }
  5038. /**
  5039. * Create a select range field.
  5040. *
  5041. * @param string $name
  5042. * @param string $begin
  5043. * @param string $end
  5044. * @param string $selected
  5045. * @param array $options
  5046. * @return string
  5047. * @static
  5048. */
  5049. public static function selectRange($name, $begin, $end, $selected = null, $options = array()){
  5050. return \Illuminate\Html\FormBuilder::selectRange($name, $begin, $end, $selected, $options);
  5051. }
  5052. /**
  5053. * Create a select year field.
  5054. *
  5055. * @param string $name
  5056. * @param string $begin
  5057. * @param string $end
  5058. * @param string $selected
  5059. * @param array $options
  5060. * @return string
  5061. * @static
  5062. */
  5063. public static function selectYear(){
  5064. return \Illuminate\Html\FormBuilder::selectYear();
  5065. }
  5066. /**
  5067. * Create a select month field.
  5068. *
  5069. * @param string $name
  5070. * @param string $selected
  5071. * @param array $options
  5072. * @param string $format
  5073. * @return string
  5074. * @static
  5075. */
  5076. public static function selectMonth($name, $selected = null, $options = array(), $format = '%B'){
  5077. return \Illuminate\Html\FormBuilder::selectMonth($name, $selected, $options, $format);
  5078. }
  5079. /**
  5080. * Get the select option for the given value.
  5081. *
  5082. * @param string $display
  5083. * @param string $value
  5084. * @param string $selected
  5085. * @return string
  5086. * @static
  5087. */
  5088. public static function getSelectOption($display, $value, $selected){
  5089. return \Illuminate\Html\FormBuilder::getSelectOption($display, $value, $selected);
  5090. }
  5091. /**
  5092. * Create a checkbox input field.
  5093. *
  5094. * @param string $name
  5095. * @param mixed $value
  5096. * @param bool $checked
  5097. * @param array $options
  5098. * @return string
  5099. * @static
  5100. */
  5101. public static function checkbox($name, $value = 1, $checked = null, $options = array()){
  5102. return \Illuminate\Html\FormBuilder::checkbox($name, $value, $checked, $options);
  5103. }
  5104. /**
  5105. * Create a radio button input field.
  5106. *
  5107. * @param string $name
  5108. * @param mixed $value
  5109. * @param bool $checked
  5110. * @param array $options
  5111. * @return string
  5112. * @static
  5113. */
  5114. public static function radio($name, $value = null, $checked = null, $options = array()){
  5115. return \Illuminate\Html\FormBuilder::radio($name, $value, $checked, $options);
  5116. }
  5117. /**
  5118. * Create a HTML reset input element.
  5119. *
  5120. * @param string $value
  5121. * @param array $attributes
  5122. * @return string
  5123. * @static
  5124. */
  5125. public static function reset($value, $attributes = array()){
  5126. return \Illuminate\Html\FormBuilder::reset($value, $attributes);
  5127. }
  5128. /**
  5129. * Create a HTML image input element.
  5130. *
  5131. * @param string $url
  5132. * @param string $name
  5133. * @param array $attributes
  5134. * @return string
  5135. * @static
  5136. */
  5137. public static function image($url, $name = null, $attributes = array()){
  5138. return \Illuminate\Html\FormBuilder::image($url, $name, $attributes);
  5139. }
  5140. /**
  5141. * Create a submit button element.
  5142. *
  5143. * @param string $value
  5144. * @param array $options
  5145. * @return string
  5146. * @static
  5147. */
  5148. public static function submit($value = null, $options = array()){
  5149. return \Illuminate\Html\FormBuilder::submit($value, $options);
  5150. }
  5151. /**
  5152. * Create a button element.
  5153. *
  5154. * @param string $value
  5155. * @param array $options
  5156. * @return string
  5157. * @static
  5158. */
  5159. public static function button($value = null, $options = array()){
  5160. return \Illuminate\Html\FormBuilder::button($value, $options);
  5161. }
  5162. /**
  5163. * Get the ID attribute for a field name.
  5164. *
  5165. * @param string $name
  5166. * @param array $attributes
  5167. * @return string
  5168. * @static
  5169. */
  5170. public static function getIdAttribute($name, $attributes){
  5171. return \Illuminate\Html\FormBuilder::getIdAttribute($name, $attributes);
  5172. }
  5173. /**
  5174. * Get the value that should be assigned to the field.
  5175. *
  5176. * @param string $name
  5177. * @param string $value
  5178. * @return string
  5179. * @static
  5180. */
  5181. public static function getValueAttribute($name, $value = null){
  5182. return \Illuminate\Html\FormBuilder::getValueAttribute($name, $value);
  5183. }
  5184. /**
  5185. * Get a value from the session's old input.
  5186. *
  5187. * @param string $name
  5188. * @return string
  5189. * @static
  5190. */
  5191. public static function old($name){
  5192. return \Illuminate\Html\FormBuilder::old($name);
  5193. }
  5194. /**
  5195. * Determine if the old input is empty.
  5196. *
  5197. * @return bool
  5198. * @static
  5199. */
  5200. public static function oldInputIsEmpty(){
  5201. return \Illuminate\Html\FormBuilder::oldInputIsEmpty();
  5202. }
  5203. /**
  5204. * Get the session store implementation.
  5205. *
  5206. * @return \Illuminate\Session\Store $session
  5207. * @static
  5208. */
  5209. public static function getSessionStore(){
  5210. return \Illuminate\Html\FormBuilder::getSessionStore();
  5211. }
  5212. /**
  5213. * Set the session store implementation.
  5214. *
  5215. * @param \Illuminate\Session\Store $session
  5216. * @return $this
  5217. * @static
  5218. */
  5219. public static function setSessionStore($session){
  5220. return \Illuminate\Html\FormBuilder::setSessionStore($session);
  5221. }
  5222. /**
  5223. * Register a custom macro.
  5224. *
  5225. * @param string $name
  5226. * @param callable $macro
  5227. * @return void
  5228. * @static
  5229. */
  5230. public static function macro($name, $macro){
  5231. \Illuminate\Html\FormBuilder::macro($name, $macro);
  5232. }
  5233. /**
  5234. * Checks if macro is registered
  5235. *
  5236. * @param string $name
  5237. * @return boolean
  5238. * @static
  5239. */
  5240. public static function hasMacro($name){
  5241. return \Illuminate\Html\FormBuilder::hasMacro($name);
  5242. }
  5243. }
  5244. class Hash extends \Illuminate\Support\Facades\Hash{
  5245. /**
  5246. * Hash the given value.
  5247. *
  5248. * @param string $value
  5249. * @param array $options
  5250. * @return string
  5251. * @throws \RuntimeException
  5252. * @static
  5253. */
  5254. public static function make($value, $options = array()){
  5255. return \Illuminate\Hashing\BcryptHasher::make($value, $options);
  5256. }
  5257. /**
  5258. * Check the given plain value against a hash.
  5259. *
  5260. * @param string $value
  5261. * @param string $hashedValue
  5262. * @param array $options
  5263. * @return bool
  5264. * @static
  5265. */
  5266. public static function check($value, $hashedValue, $options = array()){
  5267. return \Illuminate\Hashing\BcryptHasher::check($value, $hashedValue, $options);
  5268. }
  5269. /**
  5270. * Check if the given hash has been hashed using the given options.
  5271. *
  5272. * @param string $hashedValue
  5273. * @param array $options
  5274. * @return bool
  5275. * @static
  5276. */
  5277. public static function needsRehash($hashedValue, $options = array()){
  5278. return \Illuminate\Hashing\BcryptHasher::needsRehash($hashedValue, $options);
  5279. }
  5280. /**
  5281. * Set the default crypt cost factor.
  5282. *
  5283. * @param int $rounds
  5284. * @return void
  5285. * @static
  5286. */
  5287. public static function setRounds($rounds){
  5288. \Illuminate\Hashing\BcryptHasher::setRounds($rounds);
  5289. }
  5290. }
  5291. class HTML extends \Illuminate\Support\Facades\HTML{
  5292. /**
  5293. * Convert an HTML string to entities.
  5294. *
  5295. * @param string $value
  5296. * @return string
  5297. * @static
  5298. */
  5299. public static function entities($value){
  5300. return \Illuminate\Html\HtmlBuilder::entities($value);
  5301. }
  5302. /**
  5303. * Convert entities to HTML characters.
  5304. *
  5305. * @param string $value
  5306. * @return string
  5307. * @static
  5308. */
  5309. public static function decode($value){
  5310. return \Illuminate\Html\HtmlBuilder::decode($value);
  5311. }
  5312. /**
  5313. * Generate a link to a JavaScript file.
  5314. *
  5315. * @param string $url
  5316. * @param array $attributes
  5317. * @param bool $secure
  5318. * @return string
  5319. * @static
  5320. */
  5321. public static function script($url, $attributes = array(), $secure = null){
  5322. return \Illuminate\Html\HtmlBuilder::script($url, $attributes, $secure);
  5323. }
  5324. /**
  5325. * Generate a link to a CSS file.
  5326. *
  5327. * @param string $url
  5328. * @param array $attributes
  5329. * @param bool $secure
  5330. * @return string
  5331. * @static
  5332. */
  5333. public static function style($url, $attributes = array(), $secure = null){
  5334. return \Illuminate\Html\HtmlBuilder::style($url, $attributes, $secure);
  5335. }
  5336. /**
  5337. * Generate an HTML image element.
  5338. *
  5339. * @param string $url
  5340. * @param string $alt
  5341. * @param array $attributes
  5342. * @param bool $secure
  5343. * @return string
  5344. * @static
  5345. */
  5346. public static function image($url, $alt = null, $attributes = array(), $secure = null){
  5347. return \Illuminate\Html\HtmlBuilder::image($url, $alt, $attributes, $secure);
  5348. }
  5349. /**
  5350. * Generate a HTML link.
  5351. *
  5352. * @param string $url
  5353. * @param string $title
  5354. * @param array $attributes
  5355. * @param bool $secure
  5356. * @return string
  5357. * @static
  5358. */
  5359. public static function link($url, $title = null, $attributes = array(), $secure = null){
  5360. return \Illuminate\Html\HtmlBuilder::link($url, $title, $attributes, $secure);
  5361. }
  5362. /**
  5363. * Generate a HTTPS HTML link.
  5364. *
  5365. * @param string $url
  5366. * @param string $title
  5367. * @param array $attributes
  5368. * @return string
  5369. * @static
  5370. */
  5371. public static function secureLink($url, $title = null, $attributes = array()){
  5372. return \Illuminate\Html\HtmlBuilder::secureLink($url, $title, $attributes);
  5373. }
  5374. /**
  5375. * Generate a HTML link to an asset.
  5376. *
  5377. * @param string $url
  5378. * @param string $title
  5379. * @param array $attributes
  5380. * @param bool $secure
  5381. * @return string
  5382. * @static
  5383. */
  5384. public static function linkAsset($url, $title = null, $attributes = array(), $secure = null){
  5385. return \Illuminate\Html\HtmlBuilder::linkAsset($url, $title, $attributes, $secure);
  5386. }
  5387. /**
  5388. * Generate a HTTPS HTML link to an asset.
  5389. *
  5390. * @param string $url
  5391. * @param string $title
  5392. * @param array $attributes
  5393. * @return string
  5394. * @static
  5395. */
  5396. public static function linkSecureAsset($url, $title = null, $attributes = array()){
  5397. return \Illuminate\Html\HtmlBuilder::linkSecureAsset($url, $title, $attributes);
  5398. }
  5399. /**
  5400. * Generate a HTML link to a named route.
  5401. *
  5402. * @param string $name
  5403. * @param string $title
  5404. * @param array $parameters
  5405. * @param array $attributes
  5406. * @return string
  5407. * @static
  5408. */
  5409. public static function linkRoute($name, $title = null, $parameters = array(), $attributes = array()){
  5410. return \Illuminate\Html\HtmlBuilder::linkRoute($name, $title, $parameters, $attributes);
  5411. }
  5412. /**
  5413. * Generate a HTML link to a controller action.
  5414. *
  5415. * @param string $action
  5416. * @param string $title
  5417. * @param array $parameters
  5418. * @param array $attributes
  5419. * @return string
  5420. * @static
  5421. */
  5422. public static function linkAction($action, $title = null, $parameters = array(), $attributes = array()){
  5423. return \Illuminate\Html\HtmlBuilder::linkAction($action, $title, $parameters, $attributes);
  5424. }
  5425. /**
  5426. * Generate a HTML link to an email address.
  5427. *
  5428. * @param string $email
  5429. * @param string $title
  5430. * @param array $attributes
  5431. * @return string
  5432. * @static
  5433. */
  5434. public static function mailto($email, $title = null, $attributes = array()){
  5435. return \Illuminate\Html\HtmlBuilder::mailto($email, $title, $attributes);
  5436. }
  5437. /**
  5438. * Obfuscate an e-mail address to prevent spam-bots from sniffing it.
  5439. *
  5440. * @param string $email
  5441. * @return string
  5442. * @static
  5443. */
  5444. public static function email($email){
  5445. return \Illuminate\Html\HtmlBuilder::email($email);
  5446. }
  5447. /**
  5448. * Generate an ordered list of items.
  5449. *
  5450. * @param array $list
  5451. * @param array $attributes
  5452. * @return string
  5453. * @static
  5454. */
  5455. public static function ol($list, $attributes = array()){
  5456. return \Illuminate\Html\HtmlBuilder::ol($list, $attributes);
  5457. }
  5458. /**
  5459. * Generate an un-ordered list of items.
  5460. *
  5461. * @param array $list
  5462. * @param array $attributes
  5463. * @return string
  5464. * @static
  5465. */
  5466. public static function ul($list, $attributes = array()){
  5467. return \Illuminate\Html\HtmlBuilder::ul($list, $attributes);
  5468. }
  5469. /**
  5470. * Build an HTML attribute string from an array.
  5471. *
  5472. * @param array $attributes
  5473. * @return string
  5474. * @static
  5475. */
  5476. public static function attributes($attributes){
  5477. return \Illuminate\Html\HtmlBuilder::attributes($attributes);
  5478. }
  5479. /**
  5480. * Obfuscate a string to prevent spam-bots from sniffing it.
  5481. *
  5482. * @param string $value
  5483. * @return string
  5484. * @static
  5485. */
  5486. public static function obfuscate($value){
  5487. return \Illuminate\Html\HtmlBuilder::obfuscate($value);
  5488. }
  5489. /**
  5490. * Register a custom macro.
  5491. *
  5492. * @param string $name
  5493. * @param callable $macro
  5494. * @return void
  5495. * @static
  5496. */
  5497. public static function macro($name, $macro){
  5498. \Illuminate\Html\HtmlBuilder::macro($name, $macro);
  5499. }
  5500. /**
  5501. * Checks if macro is registered
  5502. *
  5503. * @param string $name
  5504. * @return boolean
  5505. * @static
  5506. */
  5507. public static function hasMacro($name){
  5508. return \Illuminate\Html\HtmlBuilder::hasMacro($name);
  5509. }
  5510. }
  5511. class Input extends \Illuminate\Support\Facades\Input{
  5512. /**
  5513. * Return the Request instance.
  5514. *
  5515. * @return $this
  5516. * @static
  5517. */
  5518. public static function instance(){
  5519. return \Illuminate\Http\Request::instance();
  5520. }
  5521. /**
  5522. * Get the request method.
  5523. *
  5524. * @return string
  5525. * @static
  5526. */
  5527. public static function method(){
  5528. return \Illuminate\Http\Request::method();
  5529. }
  5530. /**
  5531. * Get the root URL for the application.
  5532. *
  5533. * @return string
  5534. * @static
  5535. */
  5536. public static function root(){
  5537. return \Illuminate\Http\Request::root();
  5538. }
  5539. /**
  5540. * Get the URL (no query string) for the request.
  5541. *
  5542. * @return string
  5543. * @static
  5544. */
  5545. public static function url(){
  5546. return \Illuminate\Http\Request::url();
  5547. }
  5548. /**
  5549. * Get the full URL for the request.
  5550. *
  5551. * @return string
  5552. * @static
  5553. */
  5554. public static function fullUrl(){
  5555. return \Illuminate\Http\Request::fullUrl();
  5556. }
  5557. /**
  5558. * Get the current path info for the request.
  5559. *
  5560. * @return string
  5561. * @static
  5562. */
  5563. public static function path(){
  5564. return \Illuminate\Http\Request::path();
  5565. }
  5566. /**
  5567. * Get the current encoded path info for the request.
  5568. *
  5569. * @return string
  5570. * @static
  5571. */
  5572. public static function decodedPath(){
  5573. return \Illuminate\Http\Request::decodedPath();
  5574. }
  5575. /**
  5576. * Get a segment from the URI (1 based index).
  5577. *
  5578. * @param string $index
  5579. * @param mixed $default
  5580. * @return string
  5581. * @static
  5582. */
  5583. public static function segment($index, $default = null){
  5584. return \Illuminate\Http\Request::segment($index, $default);
  5585. }
  5586. /**
  5587. * Get all of the segments for the request path.
  5588. *
  5589. * @return array
  5590. * @static
  5591. */
  5592. public static function segments(){
  5593. return \Illuminate\Http\Request::segments();
  5594. }
  5595. /**
  5596. * Determine if the current request URI matches a pattern.
  5597. *
  5598. * @param mixed string
  5599. * @return bool
  5600. * @static
  5601. */
  5602. public static function is(){
  5603. return \Illuminate\Http\Request::is();
  5604. }
  5605. /**
  5606. * Determine if the request is the result of an AJAX call.
  5607. *
  5608. * @return bool
  5609. * @static
  5610. */
  5611. public static function ajax(){
  5612. return \Illuminate\Http\Request::ajax();
  5613. }
  5614. /**
  5615. * Determine if the request is over HTTPS.
  5616. *
  5617. * @return bool
  5618. * @static
  5619. */
  5620. public static function secure(){
  5621. return \Illuminate\Http\Request::secure();
  5622. }
  5623. /**
  5624. * Returns the client IP address.
  5625. *
  5626. * @return string
  5627. * @static
  5628. */
  5629. public static function ip(){
  5630. return \Illuminate\Http\Request::ip();
  5631. }
  5632. /**
  5633. * Returns the client IP addresses.
  5634. *
  5635. * @return array
  5636. * @static
  5637. */
  5638. public static function ips(){
  5639. return \Illuminate\Http\Request::ips();
  5640. }
  5641. /**
  5642. * Determine if the request contains a given input item key.
  5643. *
  5644. * @param string|array $key
  5645. * @return bool
  5646. * @static
  5647. */
  5648. public static function exists($key){
  5649. return \Illuminate\Http\Request::exists($key);
  5650. }
  5651. /**
  5652. * Determine if the request contains a non-empty value for an input item.
  5653. *
  5654. * @param string|array $key
  5655. * @return bool
  5656. * @static
  5657. */
  5658. public static function has($key){
  5659. return \Illuminate\Http\Request::has($key);
  5660. }
  5661. /**
  5662. * Get all of the input and files for the request.
  5663. *
  5664. * @return array
  5665. * @static
  5666. */
  5667. public static function all(){
  5668. return \Illuminate\Http\Request::all();
  5669. }
  5670. /**
  5671. * Retrieve an input item from the request.
  5672. *
  5673. * @param string $key
  5674. * @param mixed $default
  5675. * @return string
  5676. * @static
  5677. */
  5678. public static function input($key = null, $default = null){
  5679. return \Illuminate\Http\Request::input($key, $default);
  5680. }
  5681. /**
  5682. * Get a subset of the items from the input data.
  5683. *
  5684. * @param array $keys
  5685. * @return array
  5686. * @static
  5687. */
  5688. public static function only($keys){
  5689. return \Illuminate\Http\Request::only($keys);
  5690. }
  5691. /**
  5692. * Get all of the input except for a specified array of items.
  5693. *
  5694. * @param array $keys
  5695. * @return array
  5696. * @static
  5697. */
  5698. public static function except($keys){
  5699. return \Illuminate\Http\Request::except($keys);
  5700. }
  5701. /**
  5702. * Retrieve a query string item from the request.
  5703. *
  5704. * @param string $key
  5705. * @param mixed $default
  5706. * @return string
  5707. * @static
  5708. */
  5709. public static function query($key = null, $default = null){
  5710. return \Illuminate\Http\Request::query($key, $default);
  5711. }
  5712. /**
  5713. * Determine if a cookie is set on the request.
  5714. *
  5715. * @param string $key
  5716. * @return bool
  5717. * @static
  5718. */
  5719. public static function hasCookie($key){
  5720. return \Illuminate\Http\Request::hasCookie($key);
  5721. }
  5722. /**
  5723. * Retrieve a cookie from the request.
  5724. *
  5725. * @param string $key
  5726. * @param mixed $default
  5727. * @return string
  5728. * @static
  5729. */
  5730. public static function cookie($key = null, $default = null){
  5731. return \Illuminate\Http\Request::cookie($key, $default);
  5732. }
  5733. /**
  5734. * Retrieve a file from the request.
  5735. *
  5736. * @param string $key
  5737. * @param mixed $default
  5738. * @return \Symfony\Component\HttpFoundation\File\UploadedFile|array
  5739. * @static
  5740. */
  5741. public static function file($key = null, $default = null){
  5742. return \Illuminate\Http\Request::file($key, $default);
  5743. }
  5744. /**
  5745. * Determine if the uploaded data contains a file.
  5746. *
  5747. * @param string $key
  5748. * @return bool
  5749. * @static
  5750. */
  5751. public static function hasFile($key){
  5752. return \Illuminate\Http\Request::hasFile($key);
  5753. }
  5754. /**
  5755. * Retrieve a header from the request.
  5756. *
  5757. * @param string $key
  5758. * @param mixed $default
  5759. * @return string
  5760. * @static
  5761. */
  5762. public static function header($key = null, $default = null){
  5763. return \Illuminate\Http\Request::header($key, $default);
  5764. }
  5765. /**
  5766. * Retrieve a server variable from the request.
  5767. *
  5768. * @param string $key
  5769. * @param mixed $default
  5770. * @return string
  5771. * @static
  5772. */
  5773. public static function server($key = null, $default = null){
  5774. return \Illuminate\Http\Request::server($key, $default);
  5775. }
  5776. /**
  5777. * Retrieve an old input item.
  5778. *
  5779. * @param string $key
  5780. * @param mixed $default
  5781. * @return mixed
  5782. * @static
  5783. */
  5784. public static function old($key = null, $default = null){
  5785. return \Illuminate\Http\Request::old($key, $default);
  5786. }
  5787. /**
  5788. * Flash the input for the current request to the session.
  5789. *
  5790. * @param string $filter
  5791. * @param array $keys
  5792. * @return void
  5793. * @static
  5794. */
  5795. public static function flash($filter = null, $keys = array()){
  5796. \Illuminate\Http\Request::flash($filter, $keys);
  5797. }
  5798. /**
  5799. * Flash only some of the input to the session.
  5800. *
  5801. * @param mixed string
  5802. * @return void
  5803. * @static
  5804. */
  5805. public static function flashOnly($keys){
  5806. \Illuminate\Http\Request::flashOnly($keys);
  5807. }
  5808. /**
  5809. * Flash only some of the input to the session.
  5810. *
  5811. * @param mixed string
  5812. * @return void
  5813. * @static
  5814. */
  5815. public static function flashExcept($keys){
  5816. \Illuminate\Http\Request::flashExcept($keys);
  5817. }
  5818. /**
  5819. * Flush all of the old input from the session.
  5820. *
  5821. * @return void
  5822. * @static
  5823. */
  5824. public static function flush(){
  5825. \Illuminate\Http\Request::flush();
  5826. }
  5827. /**
  5828. * Merge new input into the current request's input array.
  5829. *
  5830. * @param array $input
  5831. * @return void
  5832. * @static
  5833. */
  5834. public static function merge($input){
  5835. \Illuminate\Http\Request::merge($input);
  5836. }
  5837. /**
  5838. * Replace the input for the current request.
  5839. *
  5840. * @param array $input
  5841. * @return void
  5842. * @static
  5843. */
  5844. public static function replace($input){
  5845. \Illuminate\Http\Request::replace($input);
  5846. }
  5847. /**
  5848. * Get the JSON payload for the request.
  5849. *
  5850. * @param string $key
  5851. * @param mixed $default
  5852. * @return mixed
  5853. * @static
  5854. */
  5855. public static function json($key = null, $default = null){
  5856. return \Illuminate\Http\Request::json($key, $default);
  5857. }
  5858. /**
  5859. * Determine if the request is sending JSON.
  5860. *
  5861. * @return bool
  5862. * @static
  5863. */
  5864. public static function isJson(){
  5865. return \Illuminate\Http\Request::isJson();
  5866. }
  5867. /**
  5868. * Determine if the current request is asking for JSON in return.
  5869. *
  5870. * @return bool
  5871. * @static
  5872. */
  5873. public static function wantsJson(){
  5874. return \Illuminate\Http\Request::wantsJson();
  5875. }
  5876. /**
  5877. * Get the data format expected in the response.
  5878. *
  5879. * @param string $default
  5880. * @return string
  5881. * @static
  5882. */
  5883. public static function format($default = 'html'){
  5884. return \Illuminate\Http\Request::format($default);
  5885. }
  5886. /**
  5887. * Create an Illuminate request from a Symfony instance.
  5888. *
  5889. * @param \Symfony\Component\HttpFoundation\Request $request
  5890. * @return \Illuminate\Http\Request
  5891. * @static
  5892. */
  5893. public static function createFromBase($request){
  5894. return \Illuminate\Http\Request::createFromBase($request);
  5895. }
  5896. /**
  5897. * Get the session associated with the request.
  5898. *
  5899. * @return \Illuminate\Session\Store
  5900. * @throws \RuntimeException
  5901. * @static
  5902. */
  5903. public static function session(){
  5904. return \Illuminate\Http\Request::session();
  5905. }
  5906. /**
  5907. * Sets the parameters for this request.
  5908. *
  5909. * This method also re-initializes all properties.
  5910. *
  5911. * @param array $query The GET parameters
  5912. * @param array $request The POST parameters
  5913. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  5914. * @param array $cookies The COOKIE parameters
  5915. * @param array $files The FILES parameters
  5916. * @param array $server The SERVER parameters
  5917. * @param string $content The raw body data
  5918. * @api
  5919. * @static
  5920. */
  5921. public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){
  5922. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5923. return \Illuminate\Http\Request::initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  5924. }
  5925. /**
  5926. * Creates a new request with values from PHP's super globals.
  5927. *
  5928. * @return \Symfony\Component\HttpFoundation\Request A new request
  5929. * @api
  5930. * @static
  5931. */
  5932. public static function createFromGlobals(){
  5933. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5934. return \Illuminate\Http\Request::createFromGlobals();
  5935. }
  5936. /**
  5937. * Creates a Request based on a given URI and configuration.
  5938. *
  5939. * The information contained in the URI always take precedence
  5940. * over the other information (server and parameters).
  5941. *
  5942. * @param string $uri The URI
  5943. * @param string $method The HTTP method
  5944. * @param array $parameters The query (GET) or request (POST) parameters
  5945. * @param array $cookies The request cookies ($_COOKIE)
  5946. * @param array $files The request files ($_FILES)
  5947. * @param array $server The server parameters ($_SERVER)
  5948. * @param string $content The raw body data
  5949. * @return \Symfony\Component\HttpFoundation\Request A Request instance
  5950. * @api
  5951. * @static
  5952. */
  5953. public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){
  5954. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5955. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  5956. }
  5957. /**
  5958. * Sets a callable able to create a Request instance.
  5959. *
  5960. * This is mainly useful when you need to override the Request class
  5961. * to keep BC with an existing system. It should not be used for any
  5962. * other purpose.
  5963. *
  5964. * @param callable|null $callable A PHP callable
  5965. * @static
  5966. */
  5967. public static function setFactory($callable){
  5968. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5969. return \Illuminate\Http\Request::setFactory($callable);
  5970. }
  5971. /**
  5972. * Clones a request and overrides some of its parameters.
  5973. *
  5974. * @param array $query The GET parameters
  5975. * @param array $request The POST parameters
  5976. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  5977. * @param array $cookies The COOKIE parameters
  5978. * @param array $files The FILES parameters
  5979. * @param array $server The SERVER parameters
  5980. * @return \Symfony\Component\HttpFoundation\Request The duplicated request
  5981. * @api
  5982. * @static
  5983. */
  5984. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){
  5985. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5986. return \Illuminate\Http\Request::duplicate($query, $request, $attributes, $cookies, $files, $server);
  5987. }
  5988. /**
  5989. * Overrides the PHP global variables according to this request instance.
  5990. *
  5991. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  5992. * $_FILES is never overridden, see rfc1867
  5993. *
  5994. * @api
  5995. * @static
  5996. */
  5997. public static function overrideGlobals(){
  5998. //Method inherited from \Symfony\Component\HttpFoundation\Request
  5999. return \Illuminate\Http\Request::overrideGlobals();
  6000. }
  6001. /**
  6002. * Sets a list of trusted proxies.
  6003. *
  6004. * You should only list the reverse proxies that you manage directly.
  6005. *
  6006. * @param array $proxies A list of trusted proxies
  6007. * @api
  6008. * @static
  6009. */
  6010. public static function setTrustedProxies($proxies){
  6011. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6012. return \Illuminate\Http\Request::setTrustedProxies($proxies);
  6013. }
  6014. /**
  6015. * Gets the list of trusted proxies.
  6016. *
  6017. * @return array An array of trusted proxies.
  6018. * @static
  6019. */
  6020. public static function getTrustedProxies(){
  6021. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6022. return \Illuminate\Http\Request::getTrustedProxies();
  6023. }
  6024. /**
  6025. * Sets a list of trusted host patterns.
  6026. *
  6027. * You should only list the hosts you manage using regexs.
  6028. *
  6029. * @param array $hostPatterns A list of trusted host patterns
  6030. * @static
  6031. */
  6032. public static function setTrustedHosts($hostPatterns){
  6033. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6034. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  6035. }
  6036. /**
  6037. * Gets the list of trusted host patterns.
  6038. *
  6039. * @return array An array of trusted host patterns.
  6040. * @static
  6041. */
  6042. public static function getTrustedHosts(){
  6043. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6044. return \Illuminate\Http\Request::getTrustedHosts();
  6045. }
  6046. /**
  6047. * Sets the name for trusted headers.
  6048. *
  6049. * The following header keys are supported:
  6050. *
  6051. * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp())
  6052. * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost())
  6053. * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort())
  6054. * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure())
  6055. *
  6056. * Setting an empty value allows to disable the trusted header for the given key.
  6057. *
  6058. * @param string $key The header key
  6059. * @param string $value The header name
  6060. * @throws \InvalidArgumentException
  6061. * @static
  6062. */
  6063. public static function setTrustedHeaderName($key, $value){
  6064. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6065. return \Illuminate\Http\Request::setTrustedHeaderName($key, $value);
  6066. }
  6067. /**
  6068. * Gets the trusted proxy header name.
  6069. *
  6070. * @param string $key The header key
  6071. * @return string The header name
  6072. * @throws \InvalidArgumentException
  6073. * @static
  6074. */
  6075. public static function getTrustedHeaderName($key){
  6076. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6077. return \Illuminate\Http\Request::getTrustedHeaderName($key);
  6078. }
  6079. /**
  6080. * Normalizes a query string.
  6081. *
  6082. * It builds a normalized query string, where keys/value pairs are alphabetized,
  6083. * have consistent escaping and unneeded delimiters are removed.
  6084. *
  6085. * @param string $qs Query string
  6086. * @return string A normalized query string for the Request
  6087. * @static
  6088. */
  6089. public static function normalizeQueryString($qs){
  6090. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6091. return \Illuminate\Http\Request::normalizeQueryString($qs);
  6092. }
  6093. /**
  6094. * Enables support for the _method request parameter to determine the intended HTTP method.
  6095. *
  6096. * Be warned that enabling this feature might lead to CSRF issues in your code.
  6097. * Check that you are using CSRF tokens when required.
  6098. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  6099. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  6100. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  6101. *
  6102. * The HTTP method can only be overridden when the real HTTP method is POST.
  6103. *
  6104. * @static
  6105. */
  6106. public static function enableHttpMethodParameterOverride(){
  6107. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6108. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  6109. }
  6110. /**
  6111. * Checks whether support for the _method request parameter is enabled.
  6112. *
  6113. * @return bool True when the _method request parameter is enabled, false otherwise
  6114. * @static
  6115. */
  6116. public static function getHttpMethodParameterOverride(){
  6117. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6118. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  6119. }
  6120. /**
  6121. * Gets a "parameter" value.
  6122. *
  6123. * This method is mainly useful for libraries that want to provide some flexibility.
  6124. *
  6125. * Order of precedence: GET, PATH, POST
  6126. *
  6127. * Avoid using this method in controllers:
  6128. *
  6129. * * slow
  6130. * * prefer to get from a "named" source
  6131. *
  6132. * It is better to explicitly get request parameters from the appropriate
  6133. * public property instead (query, attributes, request).
  6134. *
  6135. * @param string $key the key
  6136. * @param mixed $default the default value
  6137. * @param bool $deep is parameter deep in multidimensional array
  6138. * @return mixed
  6139. * @static
  6140. */
  6141. public static function get($key, $default = null, $deep = false){
  6142. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6143. return \Illuminate\Http\Request::get($key, $default, $deep);
  6144. }
  6145. /**
  6146. * Gets the Session.
  6147. *
  6148. * @return \Symfony\Component\HttpFoundation\SessionInterface|null The session
  6149. * @api
  6150. * @static
  6151. */
  6152. public static function getSession(){
  6153. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6154. return \Illuminate\Http\Request::getSession();
  6155. }
  6156. /**
  6157. * Whether the request contains a Session which was started in one of the
  6158. * previous requests.
  6159. *
  6160. * @return bool
  6161. * @api
  6162. * @static
  6163. */
  6164. public static function hasPreviousSession(){
  6165. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6166. return \Illuminate\Http\Request::hasPreviousSession();
  6167. }
  6168. /**
  6169. * Whether the request contains a Session object.
  6170. *
  6171. * This method does not give any information about the state of the session object,
  6172. * like whether the session is started or not. It is just a way to check if this Request
  6173. * is associated with a Session instance.
  6174. *
  6175. * @return bool true when the Request contains a Session object, false otherwise
  6176. * @api
  6177. * @static
  6178. */
  6179. public static function hasSession(){
  6180. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6181. return \Illuminate\Http\Request::hasSession();
  6182. }
  6183. /**
  6184. * Sets the Session.
  6185. *
  6186. * @param \Symfony\Component\HttpFoundation\SessionInterface $session The Session
  6187. * @api
  6188. * @static
  6189. */
  6190. public static function setSession($session){
  6191. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6192. return \Illuminate\Http\Request::setSession($session);
  6193. }
  6194. /**
  6195. * Returns the client IP addresses.
  6196. *
  6197. * In the returned array the most trusted IP address is first, and the
  6198. * least trusted one last. The "real" client IP address is the last one,
  6199. * but this is also the least trusted one. Trusted proxies are stripped.
  6200. *
  6201. * Use this method carefully; you should use getClientIp() instead.
  6202. *
  6203. * @return array The client IP addresses
  6204. * @see getClientIp()
  6205. * @static
  6206. */
  6207. public static function getClientIps(){
  6208. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6209. return \Illuminate\Http\Request::getClientIps();
  6210. }
  6211. /**
  6212. * Returns the client IP address.
  6213. *
  6214. * This method can read the client IP address from the "X-Forwarded-For" header
  6215. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  6216. * header value is a comma+space separated list of IP addresses, the left-most
  6217. * being the original client, and each successive proxy that passed the request
  6218. * adding the IP address where it received the request from.
  6219. *
  6220. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  6221. * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with
  6222. * the "client-ip" key.
  6223. *
  6224. * @return string The client IP address
  6225. * @see getClientIps()
  6226. * @see http://en.wikipedia.org/wiki/X-Forwarded-For
  6227. * @api
  6228. * @static
  6229. */
  6230. public static function getClientIp(){
  6231. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6232. return \Illuminate\Http\Request::getClientIp();
  6233. }
  6234. /**
  6235. * Returns current script name.
  6236. *
  6237. * @return string
  6238. * @api
  6239. * @static
  6240. */
  6241. public static function getScriptName(){
  6242. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6243. return \Illuminate\Http\Request::getScriptName();
  6244. }
  6245. /**
  6246. * Returns the path being requested relative to the executed script.
  6247. *
  6248. * The path info always starts with a /.
  6249. *
  6250. * Suppose this request is instantiated from /mysite on localhost:
  6251. *
  6252. * * http://localhost/mysite returns an empty string
  6253. * * http://localhost/mysite/about returns '/about'
  6254. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  6255. * * http://localhost/mysite/about?var=1 returns '/about'
  6256. *
  6257. * @return string The raw path (i.e. not urldecoded)
  6258. * @api
  6259. * @static
  6260. */
  6261. public static function getPathInfo(){
  6262. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6263. return \Illuminate\Http\Request::getPathInfo();
  6264. }
  6265. /**
  6266. * Returns the root path from which this request is executed.
  6267. *
  6268. * Suppose that an index.php file instantiates this request object:
  6269. *
  6270. * * http://localhost/index.php returns an empty string
  6271. * * http://localhost/index.php/page returns an empty string
  6272. * * http://localhost/web/index.php returns '/web'
  6273. * * http://localhost/we%20b/index.php returns '/we%20b'
  6274. *
  6275. * @return string The raw path (i.e. not urldecoded)
  6276. * @api
  6277. * @static
  6278. */
  6279. public static function getBasePath(){
  6280. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6281. return \Illuminate\Http\Request::getBasePath();
  6282. }
  6283. /**
  6284. * Returns the root URL from which this request is executed.
  6285. *
  6286. * The base URL never ends with a /.
  6287. *
  6288. * This is similar to getBasePath(), except that it also includes the
  6289. * script filename (e.g. index.php) if one exists.
  6290. *
  6291. * @return string The raw URL (i.e. not urldecoded)
  6292. * @api
  6293. * @static
  6294. */
  6295. public static function getBaseUrl(){
  6296. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6297. return \Illuminate\Http\Request::getBaseUrl();
  6298. }
  6299. /**
  6300. * Gets the request's scheme.
  6301. *
  6302. * @return string
  6303. * @api
  6304. * @static
  6305. */
  6306. public static function getScheme(){
  6307. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6308. return \Illuminate\Http\Request::getScheme();
  6309. }
  6310. /**
  6311. * Returns the port on which the request is made.
  6312. *
  6313. * This method can read the client port from the "X-Forwarded-Port" header
  6314. * when trusted proxies were set via "setTrustedProxies()".
  6315. *
  6316. * The "X-Forwarded-Port" header must contain the client port.
  6317. *
  6318. * If your reverse proxy uses a different header name than "X-Forwarded-Port",
  6319. * configure it via "setTrustedHeaderName()" with the "client-port" key.
  6320. *
  6321. * @return string
  6322. * @api
  6323. * @static
  6324. */
  6325. public static function getPort(){
  6326. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6327. return \Illuminate\Http\Request::getPort();
  6328. }
  6329. /**
  6330. * Returns the user.
  6331. *
  6332. * @return string|null
  6333. * @static
  6334. */
  6335. public static function getUser(){
  6336. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6337. return \Illuminate\Http\Request::getUser();
  6338. }
  6339. /**
  6340. * Returns the password.
  6341. *
  6342. * @return string|null
  6343. * @static
  6344. */
  6345. public static function getPassword(){
  6346. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6347. return \Illuminate\Http\Request::getPassword();
  6348. }
  6349. /**
  6350. * Gets the user info.
  6351. *
  6352. * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server
  6353. * @static
  6354. */
  6355. public static function getUserInfo(){
  6356. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6357. return \Illuminate\Http\Request::getUserInfo();
  6358. }
  6359. /**
  6360. * Returns the HTTP host being requested.
  6361. *
  6362. * The port name will be appended to the host if it's non-standard.
  6363. *
  6364. * @return string
  6365. * @api
  6366. * @static
  6367. */
  6368. public static function getHttpHost(){
  6369. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6370. return \Illuminate\Http\Request::getHttpHost();
  6371. }
  6372. /**
  6373. * Returns the requested URI (path and query string).
  6374. *
  6375. * @return string The raw URI (i.e. not URI decoded)
  6376. * @api
  6377. * @static
  6378. */
  6379. public static function getRequestUri(){
  6380. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6381. return \Illuminate\Http\Request::getRequestUri();
  6382. }
  6383. /**
  6384. * Gets the scheme and HTTP host.
  6385. *
  6386. * If the URL was called with basic authentication, the user
  6387. * and the password are not added to the generated string.
  6388. *
  6389. * @return string The scheme and HTTP host
  6390. * @static
  6391. */
  6392. public static function getSchemeAndHttpHost(){
  6393. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6394. return \Illuminate\Http\Request::getSchemeAndHttpHost();
  6395. }
  6396. /**
  6397. * Generates a normalized URI (URL) for the Request.
  6398. *
  6399. * @return string A normalized URI (URL) for the Request
  6400. * @see getQueryString()
  6401. * @api
  6402. * @static
  6403. */
  6404. public static function getUri(){
  6405. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6406. return \Illuminate\Http\Request::getUri();
  6407. }
  6408. /**
  6409. * Generates a normalized URI for the given path.
  6410. *
  6411. * @param string $path A path to use instead of the current one
  6412. * @return string The normalized URI for the path
  6413. * @api
  6414. * @static
  6415. */
  6416. public static function getUriForPath($path){
  6417. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6418. return \Illuminate\Http\Request::getUriForPath($path);
  6419. }
  6420. /**
  6421. * Generates the normalized query string for the Request.
  6422. *
  6423. * It builds a normalized query string, where keys/value pairs are alphabetized
  6424. * and have consistent escaping.
  6425. *
  6426. * @return string|null A normalized query string for the Request
  6427. * @api
  6428. * @static
  6429. */
  6430. public static function getQueryString(){
  6431. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6432. return \Illuminate\Http\Request::getQueryString();
  6433. }
  6434. /**
  6435. * Checks whether the request is secure or not.
  6436. *
  6437. * This method can read the client port from the "X-Forwarded-Proto" header
  6438. * when trusted proxies were set via "setTrustedProxies()".
  6439. *
  6440. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  6441. *
  6442. * If your reverse proxy uses a different header name than "X-Forwarded-Proto"
  6443. * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with
  6444. * the "client-proto" key.
  6445. *
  6446. * @return bool
  6447. * @api
  6448. * @static
  6449. */
  6450. public static function isSecure(){
  6451. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6452. return \Illuminate\Http\Request::isSecure();
  6453. }
  6454. /**
  6455. * Returns the host name.
  6456. *
  6457. * This method can read the client port from the "X-Forwarded-Host" header
  6458. * when trusted proxies were set via "setTrustedProxies()".
  6459. *
  6460. * The "X-Forwarded-Host" header must contain the client host name.
  6461. *
  6462. * If your reverse proxy uses a different header name than "X-Forwarded-Host",
  6463. * configure it via "setTrustedHeaderName()" with the "client-host" key.
  6464. *
  6465. * @return string
  6466. * @throws \UnexpectedValueException when the host name is invalid
  6467. * @api
  6468. * @static
  6469. */
  6470. public static function getHost(){
  6471. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6472. return \Illuminate\Http\Request::getHost();
  6473. }
  6474. /**
  6475. * Sets the request method.
  6476. *
  6477. * @param string $method
  6478. * @api
  6479. * @static
  6480. */
  6481. public static function setMethod($method){
  6482. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6483. return \Illuminate\Http\Request::setMethod($method);
  6484. }
  6485. /**
  6486. * Gets the request "intended" method.
  6487. *
  6488. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  6489. * then it is used to determine the "real" intended HTTP method.
  6490. *
  6491. * The _method request parameter can also be used to determine the HTTP method,
  6492. * but only if enableHttpMethodParameterOverride() has been called.
  6493. *
  6494. * The method is always an uppercased string.
  6495. *
  6496. * @return string The request method
  6497. * @api
  6498. * @see getRealMethod()
  6499. * @static
  6500. */
  6501. public static function getMethod(){
  6502. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6503. return \Illuminate\Http\Request::getMethod();
  6504. }
  6505. /**
  6506. * Gets the "real" request method.
  6507. *
  6508. * @return string The request method
  6509. * @see getMethod()
  6510. * @static
  6511. */
  6512. public static function getRealMethod(){
  6513. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6514. return \Illuminate\Http\Request::getRealMethod();
  6515. }
  6516. /**
  6517. * Gets the mime type associated with the format.
  6518. *
  6519. * @param string $format The format
  6520. * @return string The associated mime type (null if not found)
  6521. * @api
  6522. * @static
  6523. */
  6524. public static function getMimeType($format){
  6525. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6526. return \Illuminate\Http\Request::getMimeType($format);
  6527. }
  6528. /**
  6529. * Gets the format associated with the mime type.
  6530. *
  6531. * @param string $mimeType The associated mime type
  6532. * @return string|null The format (null if not found)
  6533. * @api
  6534. * @static
  6535. */
  6536. public static function getFormat($mimeType){
  6537. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6538. return \Illuminate\Http\Request::getFormat($mimeType);
  6539. }
  6540. /**
  6541. * Associates a format with mime types.
  6542. *
  6543. * @param string $format The format
  6544. * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  6545. * @api
  6546. * @static
  6547. */
  6548. public static function setFormat($format, $mimeTypes){
  6549. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6550. return \Illuminate\Http\Request::setFormat($format, $mimeTypes);
  6551. }
  6552. /**
  6553. * Gets the request format.
  6554. *
  6555. * Here is the process to determine the format:
  6556. *
  6557. * * format defined by the user (with setRequestFormat())
  6558. * * _format request parameter
  6559. * * $default
  6560. *
  6561. * @param string $default The default format
  6562. * @return string The request format
  6563. * @api
  6564. * @static
  6565. */
  6566. public static function getRequestFormat($default = 'html'){
  6567. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6568. return \Illuminate\Http\Request::getRequestFormat($default);
  6569. }
  6570. /**
  6571. * Sets the request format.
  6572. *
  6573. * @param string $format The request format.
  6574. * @api
  6575. * @static
  6576. */
  6577. public static function setRequestFormat($format){
  6578. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6579. return \Illuminate\Http\Request::setRequestFormat($format);
  6580. }
  6581. /**
  6582. * Gets the format associated with the request.
  6583. *
  6584. * @return string|null The format (null if no content type is present)
  6585. * @api
  6586. * @static
  6587. */
  6588. public static function getContentType(){
  6589. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6590. return \Illuminate\Http\Request::getContentType();
  6591. }
  6592. /**
  6593. * Sets the default locale.
  6594. *
  6595. * @param string $locale
  6596. * @api
  6597. * @static
  6598. */
  6599. public static function setDefaultLocale($locale){
  6600. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6601. return \Illuminate\Http\Request::setDefaultLocale($locale);
  6602. }
  6603. /**
  6604. * Get the default locale.
  6605. *
  6606. * @return string
  6607. * @static
  6608. */
  6609. public static function getDefaultLocale(){
  6610. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6611. return \Illuminate\Http\Request::getDefaultLocale();
  6612. }
  6613. /**
  6614. * Sets the locale.
  6615. *
  6616. * @param string $locale
  6617. * @api
  6618. * @static
  6619. */
  6620. public static function setLocale($locale){
  6621. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6622. return \Illuminate\Http\Request::setLocale($locale);
  6623. }
  6624. /**
  6625. * Get the locale.
  6626. *
  6627. * @return string
  6628. * @static
  6629. */
  6630. public static function getLocale(){
  6631. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6632. return \Illuminate\Http\Request::getLocale();
  6633. }
  6634. /**
  6635. * Checks if the request method is of specified type.
  6636. *
  6637. * @param string $method Uppercase request method (GET, POST etc).
  6638. * @return bool
  6639. * @static
  6640. */
  6641. public static function isMethod($method){
  6642. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6643. return \Illuminate\Http\Request::isMethod($method);
  6644. }
  6645. /**
  6646. * Checks whether the method is safe or not.
  6647. *
  6648. * @return bool
  6649. * @api
  6650. * @static
  6651. */
  6652. public static function isMethodSafe(){
  6653. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6654. return \Illuminate\Http\Request::isMethodSafe();
  6655. }
  6656. /**
  6657. * Returns the request body content.
  6658. *
  6659. * @param bool $asResource If true, a resource will be returned
  6660. * @return string|resource The request body content or a resource to read the body stream.
  6661. * @throws \LogicException
  6662. * @static
  6663. */
  6664. public static function getContent($asResource = false){
  6665. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6666. return \Illuminate\Http\Request::getContent($asResource);
  6667. }
  6668. /**
  6669. * Gets the Etags.
  6670. *
  6671. * @return array The entity tags
  6672. * @static
  6673. */
  6674. public static function getETags(){
  6675. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6676. return \Illuminate\Http\Request::getETags();
  6677. }
  6678. /**
  6679. *
  6680. *
  6681. * @return bool
  6682. * @static
  6683. */
  6684. public static function isNoCache(){
  6685. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6686. return \Illuminate\Http\Request::isNoCache();
  6687. }
  6688. /**
  6689. * Returns the preferred language.
  6690. *
  6691. * @param array $locales An array of ordered available locales
  6692. * @return string|null The preferred locale
  6693. * @api
  6694. * @static
  6695. */
  6696. public static function getPreferredLanguage($locales = null){
  6697. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6698. return \Illuminate\Http\Request::getPreferredLanguage($locales);
  6699. }
  6700. /**
  6701. * Gets a list of languages acceptable by the client browser.
  6702. *
  6703. * @return array Languages ordered in the user browser preferences
  6704. * @api
  6705. * @static
  6706. */
  6707. public static function getLanguages(){
  6708. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6709. return \Illuminate\Http\Request::getLanguages();
  6710. }
  6711. /**
  6712. * Gets a list of charsets acceptable by the client browser.
  6713. *
  6714. * @return array List of charsets in preferable order
  6715. * @api
  6716. * @static
  6717. */
  6718. public static function getCharsets(){
  6719. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6720. return \Illuminate\Http\Request::getCharsets();
  6721. }
  6722. /**
  6723. * Gets a list of encodings acceptable by the client browser.
  6724. *
  6725. * @return array List of encodings in preferable order
  6726. * @static
  6727. */
  6728. public static function getEncodings(){
  6729. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6730. return \Illuminate\Http\Request::getEncodings();
  6731. }
  6732. /**
  6733. * Gets a list of content types acceptable by the client browser.
  6734. *
  6735. * @return array List of content types in preferable order
  6736. * @api
  6737. * @static
  6738. */
  6739. public static function getAcceptableContentTypes(){
  6740. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6741. return \Illuminate\Http\Request::getAcceptableContentTypes();
  6742. }
  6743. /**
  6744. * Returns true if the request is a XMLHttpRequest.
  6745. *
  6746. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  6747. * It is known to work with common JavaScript frameworks:
  6748. *
  6749. * @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  6750. * @return bool true if the request is an XMLHttpRequest, false otherwise
  6751. * @api
  6752. * @static
  6753. */
  6754. public static function isXmlHttpRequest(){
  6755. //Method inherited from \Symfony\Component\HttpFoundation\Request
  6756. return \Illuminate\Http\Request::isXmlHttpRequest();
  6757. }
  6758. }
  6759. class Lang extends \Illuminate\Support\Facades\Lang{
  6760. /**
  6761. * Determine if a translation exists.
  6762. *
  6763. * @param string $key
  6764. * @param string $locale
  6765. * @return bool
  6766. * @static
  6767. */
  6768. public static function has($key, $locale = null){
  6769. return \Illuminate\Translation\Translator::has($key, $locale);
  6770. }
  6771. /**
  6772. * Get the translation for the given key.
  6773. *
  6774. * @param string $key
  6775. * @param array $replace
  6776. * @param string $locale
  6777. * @return string
  6778. * @static
  6779. */
  6780. public static function get($key, $replace = array(), $locale = null){
  6781. return \Illuminate\Translation\Translator::get($key, $replace, $locale);
  6782. }
  6783. /**
  6784. * Get a translation according to an integer value.
  6785. *
  6786. * @param string $key
  6787. * @param int $number
  6788. * @param array $replace
  6789. * @param string $locale
  6790. * @return string
  6791. * @static
  6792. */
  6793. public static function choice($key, $number, $replace = array(), $locale = null){
  6794. return \Illuminate\Translation\Translator::choice($key, $number, $replace, $locale);
  6795. }
  6796. /**
  6797. * Get the translation for a given key.
  6798. *
  6799. * @param string $id
  6800. * @param array $parameters
  6801. * @param string $domain
  6802. * @param string $locale
  6803. * @return string
  6804. * @static
  6805. */
  6806. public static function trans($id, $parameters = array(), $domain = 'messages', $locale = null){
  6807. return \Illuminate\Translation\Translator::trans($id, $parameters, $domain, $locale);
  6808. }
  6809. /**
  6810. * Get a translation according to an integer value.
  6811. *
  6812. * @param string $id
  6813. * @param int $number
  6814. * @param array $parameters
  6815. * @param string $domain
  6816. * @param string $locale
  6817. * @return string
  6818. * @static
  6819. */
  6820. public static function transChoice($id, $number, $parameters = array(), $domain = 'messages', $locale = null){
  6821. return \Illuminate\Translation\Translator::transChoice($id, $number, $parameters, $domain, $locale);
  6822. }
  6823. /**
  6824. * Load the specified language group.
  6825. *
  6826. * @param string $namespace
  6827. * @param string $group
  6828. * @param string $locale
  6829. * @return void
  6830. * @static
  6831. */
  6832. public static function load($namespace, $group, $locale){
  6833. \Illuminate\Translation\Translator::load($namespace, $group, $locale);
  6834. }
  6835. /**
  6836. * Add a new namespace to the loader.
  6837. *
  6838. * @param string $namespace
  6839. * @param string $hint
  6840. * @return void
  6841. * @static
  6842. */
  6843. public static function addNamespace($namespace, $hint){
  6844. \Illuminate\Translation\Translator::addNamespace($namespace, $hint);
  6845. }
  6846. /**
  6847. * Parse a key into namespace, group, and item.
  6848. *
  6849. * @param string $key
  6850. * @return array
  6851. * @static
  6852. */
  6853. public static function parseKey($key){
  6854. return \Illuminate\Translation\Translator::parseKey($key);
  6855. }
  6856. /**
  6857. * Get the message selector instance.
  6858. *
  6859. * @return \Symfony\Component\Translation\MessageSelector
  6860. * @static
  6861. */
  6862. public static function getSelector(){
  6863. return \Illuminate\Translation\Translator::getSelector();
  6864. }
  6865. /**
  6866. * Set the message selector instance.
  6867. *
  6868. * @param \Symfony\Component\Translation\MessageSelector $selector
  6869. * @return void
  6870. * @static
  6871. */
  6872. public static function setSelector($selector){
  6873. \Illuminate\Translation\Translator::setSelector($selector);
  6874. }
  6875. /**
  6876. * Get the language line loader implementation.
  6877. *
  6878. * @return \Illuminate\Translation\LoaderInterface
  6879. * @static
  6880. */
  6881. public static function getLoader(){
  6882. return \Illuminate\Translation\Translator::getLoader();
  6883. }
  6884. /**
  6885. * Get the default locale being used.
  6886. *
  6887. * @return string
  6888. * @static
  6889. */
  6890. public static function locale(){
  6891. return \Illuminate\Translation\Translator::locale();
  6892. }
  6893. /**
  6894. * Get the default locale being used.
  6895. *
  6896. * @return string
  6897. * @static
  6898. */
  6899. public static function getLocale(){
  6900. return \Illuminate\Translation\Translator::getLocale();
  6901. }
  6902. /**
  6903. * Set the default locale.
  6904. *
  6905. * @param string $locale
  6906. * @return void
  6907. * @static
  6908. */
  6909. public static function setLocale($locale){
  6910. \Illuminate\Translation\Translator::setLocale($locale);
  6911. }
  6912. /**
  6913. * Get the fallback locale being used.
  6914. *
  6915. * @return string
  6916. * @static
  6917. */
  6918. public static function getFallback(){
  6919. return \Illuminate\Translation\Translator::getFallback();
  6920. }
  6921. /**
  6922. * Set the fallback locale being used.
  6923. *
  6924. * @param string $fallback
  6925. * @return void
  6926. * @static
  6927. */
  6928. public static function setFallback($fallback){
  6929. \Illuminate\Translation\Translator::setFallback($fallback);
  6930. }
  6931. /**
  6932. * Set the parsed value of a key.
  6933. *
  6934. * @param string $key
  6935. * @param array $parsed
  6936. * @return void
  6937. * @static
  6938. */
  6939. public static function setParsedKey($key, $parsed){
  6940. //Method inherited from \Illuminate\Support\NamespacedItemResolver
  6941. \Illuminate\Translation\Translator::setParsedKey($key, $parsed);
  6942. }
  6943. }
  6944. class Log extends \Illuminate\Support\Facades\Log{
  6945. /**
  6946. * Adds a log record at the DEBUG level.
  6947. *
  6948. * @param string $message The log message
  6949. * @param array $context The log context
  6950. * @return Boolean Whether the record has been processed
  6951. * @static
  6952. */
  6953. public static function debug($message, $context = array()){
  6954. return \Monolog\Logger::debug($message, $context);
  6955. }
  6956. /**
  6957. * Adds a log record at the INFO level.
  6958. *
  6959. * @param string $message The log message
  6960. * @param array $context The log context
  6961. * @return Boolean Whether the record has been processed
  6962. * @static
  6963. */
  6964. public static function info($message, $context = array()){
  6965. return \Monolog\Logger::info($message, $context);
  6966. }
  6967. /**
  6968. * Adds a log record at the NOTICE level.
  6969. *
  6970. * @param string $message The log message
  6971. * @param array $context The log context
  6972. * @return Boolean Whether the record has been processed
  6973. * @static
  6974. */
  6975. public static function notice($message, $context = array()){
  6976. return \Monolog\Logger::notice($message, $context);
  6977. }
  6978. /**
  6979. * Adds a log record at the WARNING level.
  6980. *
  6981. * @param string $message The log message
  6982. * @param array $context The log context
  6983. * @return Boolean Whether the record has been processed
  6984. * @static
  6985. */
  6986. public static function warning($message, $context = array()){
  6987. return \Monolog\Logger::warning($message, $context);
  6988. }
  6989. /**
  6990. * Adds a log record at the ERROR level.
  6991. *
  6992. * @param string $message The log message
  6993. * @param array $context The log context
  6994. * @return Boolean Whether the record has been processed
  6995. * @static
  6996. */
  6997. public static function error($message, $context = array()){
  6998. return \Monolog\Logger::error($message, $context);
  6999. }
  7000. /**
  7001. * Adds a log record at the CRITICAL level.
  7002. *
  7003. * @param string $message The log message
  7004. * @param array $context The log context
  7005. * @return Boolean Whether the record has been processed
  7006. * @static
  7007. */
  7008. public static function critical($message, $context = array()){
  7009. return \Monolog\Logger::critical($message, $context);
  7010. }
  7011. /**
  7012. * Adds a log record at the ALERT level.
  7013. *
  7014. * @param string $message The log message
  7015. * @param array $context The log context
  7016. * @return Boolean Whether the record has been processed
  7017. * @static
  7018. */
  7019. public static function alert($message, $context = array()){
  7020. return \Monolog\Logger::alert($message, $context);
  7021. }
  7022. /**
  7023. * Adds a log record at the EMERGENCY level.
  7024. *
  7025. * @param string $message The log message
  7026. * @param array $context The log context
  7027. * @return Boolean Whether the record has been processed
  7028. * @static
  7029. */
  7030. public static function emergency($message, $context = array()){
  7031. return \Monolog\Logger::emergency($message, $context);
  7032. }
  7033. /**
  7034. * Register a file log handler.
  7035. *
  7036. * @param string $path
  7037. * @param string $level
  7038. * @return void
  7039. * @static
  7040. */
  7041. public static function useFiles($path, $level = 'debug'){
  7042. \Illuminate\Log\Writer::useFiles($path, $level);
  7043. }
  7044. /**
  7045. * Register a daily file log handler.
  7046. *
  7047. * @param string $path
  7048. * @param int $days
  7049. * @param string $level
  7050. * @return void
  7051. * @static
  7052. */
  7053. public static function useDailyFiles($path, $days = 0, $level = 'debug'){
  7054. \Illuminate\Log\Writer::useDailyFiles($path, $days, $level);
  7055. }
  7056. /**
  7057. * Register an error_log handler.
  7058. *
  7059. * @param string $level
  7060. * @param integer $messageType
  7061. * @return void
  7062. * @static
  7063. */
  7064. public static function useErrorLog($level = 'debug', $messageType = 0){
  7065. \Illuminate\Log\Writer::useErrorLog($level, $messageType);
  7066. }
  7067. /**
  7068. * Register a new callback handler for when
  7069. * a log event is triggered.
  7070. *
  7071. * @param \Closure $callback
  7072. * @return void
  7073. * @throws \RuntimeException
  7074. * @static
  7075. */
  7076. public static function listen($callback){
  7077. \Illuminate\Log\Writer::listen($callback);
  7078. }
  7079. /**
  7080. * Get the underlying Monolog instance.
  7081. *
  7082. * @return \Monolog\Logger
  7083. * @static
  7084. */
  7085. public static function getMonolog(){
  7086. return \Illuminate\Log\Writer::getMonolog();
  7087. }
  7088. /**
  7089. * Get the event dispatcher instance.
  7090. *
  7091. * @return \Illuminate\Events\Dispatcher
  7092. * @static
  7093. */
  7094. public static function getEventDispatcher(){
  7095. return \Illuminate\Log\Writer::getEventDispatcher();
  7096. }
  7097. /**
  7098. * Set the event dispatcher instance.
  7099. *
  7100. * @param \Illuminate\Events\Dispatcher
  7101. * @return void
  7102. * @static
  7103. */
  7104. public static function setEventDispatcher($dispatcher){
  7105. \Illuminate\Log\Writer::setEventDispatcher($dispatcher);
  7106. }
  7107. /**
  7108. * Dynamically pass log calls into the writer.
  7109. *
  7110. * @param mixed (level, param, param)
  7111. * @return mixed
  7112. * @static
  7113. */
  7114. public static function write(){
  7115. return \Illuminate\Log\Writer::write();
  7116. }
  7117. }
  7118. class Mail extends \Illuminate\Support\Facades\Mail{
  7119. /**
  7120. * Set the global from address and name.
  7121. *
  7122. * @param string $address
  7123. * @param string $name
  7124. * @return void
  7125. * @static
  7126. */
  7127. public static function alwaysFrom($address, $name = null){
  7128. \Illuminate\Mail\Mailer::alwaysFrom($address, $name);
  7129. }
  7130. /**
  7131. * Send a new message when only a plain part.
  7132. *
  7133. * @param string $view
  7134. * @param array $data
  7135. * @param mixed $callback
  7136. * @return int
  7137. * @static
  7138. */
  7139. public static function plain($view, $data, $callback){
  7140. return \Illuminate\Mail\Mailer::plain($view, $data, $callback);
  7141. }
  7142. /**
  7143. * Send a new message using a view.
  7144. *
  7145. * @param string|array $view
  7146. * @param array $data
  7147. * @param \Closure|string $callback
  7148. * @return void
  7149. * @static
  7150. */
  7151. public static function send($view, $data, $callback){
  7152. \Illuminate\Mail\Mailer::send($view, $data, $callback);
  7153. }
  7154. /**
  7155. * Queue a new e-mail message for sending.
  7156. *
  7157. * @param string|array $view
  7158. * @param array $data
  7159. * @param \Closure|string $callback
  7160. * @param string $queue
  7161. * @return mixed
  7162. * @static
  7163. */
  7164. public static function queue($view, $data, $callback, $queue = null){
  7165. return \Illuminate\Mail\Mailer::queue($view, $data, $callback, $queue);
  7166. }
  7167. /**
  7168. * Queue a new e-mail message for sending on the given queue.
  7169. *
  7170. * @param string $queue
  7171. * @param string|array $view
  7172. * @param array $data
  7173. * @param \Closure|string $callback
  7174. * @return mixed
  7175. * @static
  7176. */
  7177. public static function queueOn($queue, $view, $data, $callback){
  7178. return \Illuminate\Mail\Mailer::queueOn($queue, $view, $data, $callback);
  7179. }
  7180. /**
  7181. * Queue a new e-mail message for sending after (n) seconds.
  7182. *
  7183. * @param int $delay
  7184. * @param string|array $view
  7185. * @param array $data
  7186. * @param \Closure|string $callback
  7187. * @param string $queue
  7188. * @return mixed
  7189. * @static
  7190. */
  7191. public static function later($delay, $view, $data, $callback, $queue = null){
  7192. return \Illuminate\Mail\Mailer::later($delay, $view, $data, $callback, $queue);
  7193. }
  7194. /**
  7195. * Queue a new e-mail message for sending after (n) seconds on the given queue.
  7196. *
  7197. * @param string $queue
  7198. * @param int $delay
  7199. * @param string|array $view
  7200. * @param array $data
  7201. * @param \Closure|string $callback
  7202. * @return mixed
  7203. * @static
  7204. */
  7205. public static function laterOn($queue, $delay, $view, $data, $callback){
  7206. return \Illuminate\Mail\Mailer::laterOn($queue, $delay, $view, $data, $callback);
  7207. }
  7208. /**
  7209. * Handle a queued e-mail message job.
  7210. *
  7211. * @param \Illuminate\Queue\Jobs\Job $job
  7212. * @param array $data
  7213. * @return void
  7214. * @static
  7215. */
  7216. public static function handleQueuedMessage($job, $data){
  7217. \Illuminate\Mail\Mailer::handleQueuedMessage($job, $data);
  7218. }
  7219. /**
  7220. * Tell the mailer to not really send messages.
  7221. *
  7222. * @param bool $value
  7223. * @return void
  7224. * @static
  7225. */
  7226. public static function pretend($value = true){
  7227. \Illuminate\Mail\Mailer::pretend($value);
  7228. }
  7229. /**
  7230. * Check if the mailer is pretending to send messages.
  7231. *
  7232. * @return bool
  7233. * @static
  7234. */
  7235. public static function isPretending(){
  7236. return \Illuminate\Mail\Mailer::isPretending();
  7237. }
  7238. /**
  7239. * Get the view factory instance.
  7240. *
  7241. * @return \Illuminate\View\Factory
  7242. * @static
  7243. */
  7244. public static function getViewFactory(){
  7245. return \Illuminate\Mail\Mailer::getViewFactory();
  7246. }
  7247. /**
  7248. * Get the Swift Mailer instance.
  7249. *
  7250. * @return \Swift_Mailer
  7251. * @static
  7252. */
  7253. public static function getSwiftMailer(){
  7254. return \Illuminate\Mail\Mailer::getSwiftMailer();
  7255. }
  7256. /**
  7257. * Get the array of failed recipients.
  7258. *
  7259. * @return array
  7260. * @static
  7261. */
  7262. public static function failures(){
  7263. return \Illuminate\Mail\Mailer::failures();
  7264. }
  7265. /**
  7266. * Set the Swift Mailer instance.
  7267. *
  7268. * @param \Swift_Mailer $swift
  7269. * @return void
  7270. * @static
  7271. */
  7272. public static function setSwiftMailer($swift){
  7273. \Illuminate\Mail\Mailer::setSwiftMailer($swift);
  7274. }
  7275. /**
  7276. * Set the log writer instance.
  7277. *
  7278. * @param \Illuminate\Log\Writer $logger
  7279. * @return $this
  7280. * @static
  7281. */
  7282. public static function setLogger($logger){
  7283. return \Illuminate\Mail\Mailer::setLogger($logger);
  7284. }
  7285. /**
  7286. * Set the queue manager instance.
  7287. *
  7288. * @param \Illuminate\Queue\QueueManager $queue
  7289. * @return $this
  7290. * @static
  7291. */
  7292. public static function setQueue($queue){
  7293. return \Illuminate\Mail\Mailer::setQueue($queue);
  7294. }
  7295. /**
  7296. * Set the IoC container instance.
  7297. *
  7298. * @param \Illuminate\Container\Container $container
  7299. * @return void
  7300. * @static
  7301. */
  7302. public static function setContainer($container){
  7303. \Illuminate\Mail\Mailer::setContainer($container);
  7304. }
  7305. }
  7306. class Paginator extends \Illuminate\Support\Facades\Paginator{
  7307. /**
  7308. * Get a new paginator instance.
  7309. *
  7310. * @param array $items
  7311. * @param int $total
  7312. * @param int|null $perPage
  7313. * @return \Illuminate\Pagination\Paginator
  7314. * @static
  7315. */
  7316. public static function make($items, $total, $perPage = null){
  7317. return \Illuminate\Pagination\Factory::make($items, $total, $perPage);
  7318. }
  7319. /**
  7320. * Get the pagination view.
  7321. *
  7322. * @param \Illuminate\Pagination\Paginator $paginator
  7323. * @param string $view
  7324. * @return \Illuminate\View\View
  7325. * @static
  7326. */
  7327. public static function getPaginationView($paginator, $view = null){
  7328. return \Illuminate\Pagination\Factory::getPaginationView($paginator, $view);
  7329. }
  7330. /**
  7331. * Get the number of the current page.
  7332. *
  7333. * @return int
  7334. * @static
  7335. */
  7336. public static function getCurrentPage(){
  7337. return \Illuminate\Pagination\Factory::getCurrentPage();
  7338. }
  7339. /**
  7340. * Set the number of the current page.
  7341. *
  7342. * @param int $number
  7343. * @return void
  7344. * @static
  7345. */
  7346. public static function setCurrentPage($number){
  7347. \Illuminate\Pagination\Factory::setCurrentPage($number);
  7348. }
  7349. /**
  7350. * Get the root URL for the request.
  7351. *
  7352. * @return string
  7353. * @static
  7354. */
  7355. public static function getCurrentUrl(){
  7356. return \Illuminate\Pagination\Factory::getCurrentUrl();
  7357. }
  7358. /**
  7359. * Set the base URL in use by the paginator.
  7360. *
  7361. * @param string $baseUrl
  7362. * @return void
  7363. * @static
  7364. */
  7365. public static function setBaseUrl($baseUrl){
  7366. \Illuminate\Pagination\Factory::setBaseUrl($baseUrl);
  7367. }
  7368. /**
  7369. * Set the input page parameter name used by the paginator.
  7370. *
  7371. * @param string $pageName
  7372. * @return void
  7373. * @static
  7374. */
  7375. public static function setPageName($pageName){
  7376. \Illuminate\Pagination\Factory::setPageName($pageName);
  7377. }
  7378. /**
  7379. * Get the input page parameter name used by the paginator.
  7380. *
  7381. * @return string
  7382. * @static
  7383. */
  7384. public static function getPageName(){
  7385. return \Illuminate\Pagination\Factory::getPageName();
  7386. }
  7387. /**
  7388. * Get the name of the pagination view.
  7389. *
  7390. * @param string $view
  7391. * @return string
  7392. * @static
  7393. */
  7394. public static function getViewName($view = null){
  7395. return \Illuminate\Pagination\Factory::getViewName($view);
  7396. }
  7397. /**
  7398. * Set the name of the pagination view.
  7399. *
  7400. * @param string $viewName
  7401. * @return void
  7402. * @static
  7403. */
  7404. public static function setViewName($viewName){
  7405. \Illuminate\Pagination\Factory::setViewName($viewName);
  7406. }
  7407. /**
  7408. * Get the locale of the paginator.
  7409. *
  7410. * @return string
  7411. * @static
  7412. */
  7413. public static function getLocale(){
  7414. return \Illuminate\Pagination\Factory::getLocale();
  7415. }
  7416. /**
  7417. * Set the locale of the paginator.
  7418. *
  7419. * @param string $locale
  7420. * @return void
  7421. * @static
  7422. */
  7423. public static function setLocale($locale){
  7424. \Illuminate\Pagination\Factory::setLocale($locale);
  7425. }
  7426. /**
  7427. * Get the active request instance.
  7428. *
  7429. * @return \Symfony\Component\HttpFoundation\Request
  7430. * @static
  7431. */
  7432. public static function getRequest(){
  7433. return \Illuminate\Pagination\Factory::getRequest();
  7434. }
  7435. /**
  7436. * Set the active request instance.
  7437. *
  7438. * @param \Symfony\Component\HttpFoundation\Request $request
  7439. * @return void
  7440. * @static
  7441. */
  7442. public static function setRequest($request){
  7443. \Illuminate\Pagination\Factory::setRequest($request);
  7444. }
  7445. /**
  7446. * Get the current view factory.
  7447. *
  7448. * @return \Illuminate\View\Factory
  7449. * @static
  7450. */
  7451. public static function getViewFactory(){
  7452. return \Illuminate\Pagination\Factory::getViewFactory();
  7453. }
  7454. /**
  7455. * Set the current view factory.
  7456. *
  7457. * @param \Illuminate\View\Factory $view
  7458. * @return void
  7459. * @static
  7460. */
  7461. public static function setViewFactory($view){
  7462. \Illuminate\Pagination\Factory::setViewFactory($view);
  7463. }
  7464. /**
  7465. * Get the translator instance.
  7466. *
  7467. * @return \Symfony\Component\Translation\TranslatorInterface
  7468. * @static
  7469. */
  7470. public static function getTranslator(){
  7471. return \Illuminate\Pagination\Factory::getTranslator();
  7472. }
  7473. }
  7474. class Password extends \Illuminate\Support\Facades\Password{
  7475. /**
  7476. * Send a password reminder to a user.
  7477. *
  7478. * @param array $credentials
  7479. * @param \Closure $callback
  7480. * @return string
  7481. * @static
  7482. */
  7483. public static function remind($credentials, $callback = null){
  7484. return \Illuminate\Auth\Reminders\PasswordBroker::remind($credentials, $callback);
  7485. }
  7486. /**
  7487. * Send the password reminder e-mail.
  7488. *
  7489. * @param \Illuminate\Auth\Reminders\RemindableInterface $user
  7490. * @param string $token
  7491. * @param \Closure $callback
  7492. * @return int
  7493. * @static
  7494. */
  7495. public static function sendReminder($user, $token, $callback = null){
  7496. return \Illuminate\Auth\Reminders\PasswordBroker::sendReminder($user, $token, $callback);
  7497. }
  7498. /**
  7499. * Reset the password for the given token.
  7500. *
  7501. * @param array $credentials
  7502. * @param \Closure $callback
  7503. * @return mixed
  7504. * @static
  7505. */
  7506. public static function reset($credentials, $callback){
  7507. return \Illuminate\Auth\Reminders\PasswordBroker::reset($credentials, $callback);
  7508. }
  7509. /**
  7510. * Set a custom password validator.
  7511. *
  7512. * @param \Closure $callback
  7513. * @return void
  7514. * @static
  7515. */
  7516. public static function validator($callback){
  7517. \Illuminate\Auth\Reminders\PasswordBroker::validator($callback);
  7518. }
  7519. /**
  7520. * Get the user for the given credentials.
  7521. *
  7522. * @param array $credentials
  7523. * @return \Illuminate\Auth\Reminders\RemindableInterface
  7524. * @throws \UnexpectedValueException
  7525. * @static
  7526. */
  7527. public static function getUser($credentials){
  7528. return \Illuminate\Auth\Reminders\PasswordBroker::getUser($credentials);
  7529. }
  7530. }
  7531. class Queue extends \Illuminate\Support\Facades\Queue{
  7532. /**
  7533. * Register an event listener for the daemon queue loop.
  7534. *
  7535. * @param mixed $callback
  7536. * @return void
  7537. * @static
  7538. */
  7539. public static function looping($callback){
  7540. \Illuminate\Queue\QueueManager::looping($callback);
  7541. }
  7542. /**
  7543. * Register an event listener for the failed job event.
  7544. *
  7545. * @param mixed $callback
  7546. * @return void
  7547. * @static
  7548. */
  7549. public static function failing($callback){
  7550. \Illuminate\Queue\QueueManager::failing($callback);
  7551. }
  7552. /**
  7553. * Register an event listener for the daemon queue stopping.
  7554. *
  7555. * @param mixed $callback
  7556. * @return void
  7557. * @static
  7558. */
  7559. public static function stopping($callback){
  7560. \Illuminate\Queue\QueueManager::stopping($callback);
  7561. }
  7562. /**
  7563. * Determine if the driver is connected.
  7564. *
  7565. * @param string $name
  7566. * @return bool
  7567. * @static
  7568. */
  7569. public static function connected($name = null){
  7570. return \Illuminate\Queue\QueueManager::connected($name);
  7571. }
  7572. /**
  7573. * Resolve a queue connection instance.
  7574. *
  7575. * @param string $name
  7576. * @return \Illuminate\Queue\SyncQueue
  7577. * @static
  7578. */
  7579. public static function connection($name = null){
  7580. return \Illuminate\Queue\QueueManager::connection($name);
  7581. }
  7582. /**
  7583. * Add a queue connection resolver.
  7584. *
  7585. * @param string $driver
  7586. * @param \Closure $resolver
  7587. * @return void
  7588. * @static
  7589. */
  7590. public static function extend($driver, $resolver){
  7591. \Illuminate\Queue\QueueManager::extend($driver, $resolver);
  7592. }
  7593. /**
  7594. * Add a queue connection resolver.
  7595. *
  7596. * @param string $driver
  7597. * @param \Closure $resolver
  7598. * @return void
  7599. * @static
  7600. */
  7601. public static function addConnector($driver, $resolver){
  7602. \Illuminate\Queue\QueueManager::addConnector($driver, $resolver);
  7603. }
  7604. /**
  7605. * Get the name of the default queue connection.
  7606. *
  7607. * @return string
  7608. * @static
  7609. */
  7610. public static function getDefaultDriver(){
  7611. return \Illuminate\Queue\QueueManager::getDefaultDriver();
  7612. }
  7613. /**
  7614. * Set the name of the default queue connection.
  7615. *
  7616. * @param string $name
  7617. * @return void
  7618. * @static
  7619. */
  7620. public static function setDefaultDriver($name){
  7621. \Illuminate\Queue\QueueManager::setDefaultDriver($name);
  7622. }
  7623. /**
  7624. * Get the full name for the given connection.
  7625. *
  7626. * @param string $connection
  7627. * @return string
  7628. * @static
  7629. */
  7630. public static function getName($connection = null){
  7631. return \Illuminate\Queue\QueueManager::getName($connection);
  7632. }
  7633. /**
  7634. * Determine if the application is in maintenance mode.
  7635. *
  7636. * @return bool
  7637. * @static
  7638. */
  7639. public static function isDownForMaintenance(){
  7640. return \Illuminate\Queue\QueueManager::isDownForMaintenance();
  7641. }
  7642. /**
  7643. * Push a new job onto the queue.
  7644. *
  7645. * @param string $job
  7646. * @param mixed $data
  7647. * @param string $queue
  7648. * @return mixed
  7649. * @static
  7650. */
  7651. public static function push($job, $data = '', $queue = null){
  7652. return \Illuminate\Queue\SyncQueue::push($job, $data, $queue);
  7653. }
  7654. /**
  7655. * Push a raw payload onto the queue.
  7656. *
  7657. * @param string $payload
  7658. * @param string $queue
  7659. * @param array $options
  7660. * @return mixed
  7661. * @static
  7662. */
  7663. public static function pushRaw($payload, $queue = null, $options = array()){
  7664. return \Illuminate\Queue\SyncQueue::pushRaw($payload, $queue, $options);
  7665. }
  7666. /**
  7667. * Push a new job onto the queue after a delay.
  7668. *
  7669. * @param \DateTime|int $delay
  7670. * @param string $job
  7671. * @param mixed $data
  7672. * @param string $queue
  7673. * @return mixed
  7674. * @static
  7675. */
  7676. public static function later($delay, $job, $data = '', $queue = null){
  7677. return \Illuminate\Queue\SyncQueue::later($delay, $job, $data, $queue);
  7678. }
  7679. /**
  7680. * Pop the next job off of the queue.
  7681. *
  7682. * @param string $queue
  7683. * @return \Illuminate\Queue\Jobs\Job|null
  7684. * @static
  7685. */
  7686. public static function pop($queue = null){
  7687. return \Illuminate\Queue\SyncQueue::pop($queue);
  7688. }
  7689. /**
  7690. * Marshal a push queue request and fire the job.
  7691. *
  7692. * @throws \RuntimeException
  7693. * @static
  7694. */
  7695. public static function marshal(){
  7696. //Method inherited from \Illuminate\Queue\Queue
  7697. return \Illuminate\Queue\SyncQueue::marshal();
  7698. }
  7699. /**
  7700. * Push an array of jobs onto the queue.
  7701. *
  7702. * @param array $jobs
  7703. * @param mixed $data
  7704. * @param string $queue
  7705. * @return mixed
  7706. * @static
  7707. */
  7708. public static function bulk($jobs, $data = '', $queue = null){
  7709. //Method inherited from \Illuminate\Queue\Queue
  7710. return \Illuminate\Queue\SyncQueue::bulk($jobs, $data, $queue);
  7711. }
  7712. /**
  7713. * Get the current UNIX timestamp.
  7714. *
  7715. * @return int
  7716. * @static
  7717. */
  7718. public static function getTime(){
  7719. //Method inherited from \Illuminate\Queue\Queue
  7720. return \Illuminate\Queue\SyncQueue::getTime();
  7721. }
  7722. /**
  7723. * Set the IoC container instance.
  7724. *
  7725. * @param \Illuminate\Container\Container $container
  7726. * @return void
  7727. * @static
  7728. */
  7729. public static function setContainer($container){
  7730. //Method inherited from \Illuminate\Queue\Queue
  7731. \Illuminate\Queue\SyncQueue::setContainer($container);
  7732. }
  7733. /**
  7734. * Set the encrypter instance.
  7735. *
  7736. * @param \Illuminate\Encryption\Encrypter $crypt
  7737. * @return void
  7738. * @static
  7739. */
  7740. public static function setEncrypter($crypt){
  7741. //Method inherited from \Illuminate\Queue\Queue
  7742. \Illuminate\Queue\SyncQueue::setEncrypter($crypt);
  7743. }
  7744. }
  7745. class Redirect extends \Illuminate\Support\Facades\Redirect{
  7746. /**
  7747. * Create a new redirect response to the "home" route.
  7748. *
  7749. * @param int $status
  7750. * @return \Illuminate\Http\RedirectResponse
  7751. * @static
  7752. */
  7753. public static function home($status = 302){
  7754. return \Illuminate\Routing\Redirector::home($status);
  7755. }
  7756. /**
  7757. * Create a new redirect response to the previous location.
  7758. *
  7759. * @param int $status
  7760. * @param array $headers
  7761. * @return \Illuminate\Http\RedirectResponse
  7762. * @static
  7763. */
  7764. public static function back($status = 302, $headers = array()){
  7765. return \Illuminate\Routing\Redirector::back($status, $headers);
  7766. }
  7767. /**
  7768. * Create a new redirect response to the current URI.
  7769. *
  7770. * @param int $status
  7771. * @param array $headers
  7772. * @return \Illuminate\Http\RedirectResponse
  7773. * @static
  7774. */
  7775. public static function refresh($status = 302, $headers = array()){
  7776. return \Illuminate\Routing\Redirector::refresh($status, $headers);
  7777. }
  7778. /**
  7779. * Create a new redirect response, while putting the current URL in the session.
  7780. *
  7781. * @param string $path
  7782. * @param int $status
  7783. * @param array $headers
  7784. * @param bool $secure
  7785. * @return \Illuminate\Http\RedirectResponse
  7786. * @static
  7787. */
  7788. public static function guest($path, $status = 302, $headers = array(), $secure = null){
  7789. return \Illuminate\Routing\Redirector::guest($path, $status, $headers, $secure);
  7790. }
  7791. /**
  7792. * Create a new redirect response to the previously intended location.
  7793. *
  7794. * @param string $default
  7795. * @param int $status
  7796. * @param array $headers
  7797. * @param bool $secure
  7798. * @return \Illuminate\Http\RedirectResponse
  7799. * @static
  7800. */
  7801. public static function intended($default = '/', $status = 302, $headers = array(), $secure = null){
  7802. return \Illuminate\Routing\Redirector::intended($default, $status, $headers, $secure);
  7803. }
  7804. /**
  7805. * Create a new redirect response to the given path.
  7806. *
  7807. * @param string $path
  7808. * @param int $status
  7809. * @param array $headers
  7810. * @param bool $secure
  7811. * @return \Illuminate\Http\RedirectResponse
  7812. * @static
  7813. */
  7814. public static function to($path, $status = 302, $headers = array(), $secure = null){
  7815. return \Illuminate\Routing\Redirector::to($path, $status, $headers, $secure);
  7816. }
  7817. /**
  7818. * Create a new redirect response to an external URL (no validation).
  7819. *
  7820. * @param string $path
  7821. * @param int $status
  7822. * @param array $headers
  7823. * @return \Illuminate\Http\RedirectResponse
  7824. * @static
  7825. */
  7826. public static function away($path, $status = 302, $headers = array()){
  7827. return \Illuminate\Routing\Redirector::away($path, $status, $headers);
  7828. }
  7829. /**
  7830. * Create a new redirect response to the given HTTPS path.
  7831. *
  7832. * @param string $path
  7833. * @param int $status
  7834. * @param array $headers
  7835. * @return \Illuminate\Http\RedirectResponse
  7836. * @static
  7837. */
  7838. public static function secure($path, $status = 302, $headers = array()){
  7839. return \Illuminate\Routing\Redirector::secure($path, $status, $headers);
  7840. }
  7841. /**
  7842. * Create a new redirect response to a named route.
  7843. *
  7844. * @param string $route
  7845. * @param array $parameters
  7846. * @param int $status
  7847. * @param array $headers
  7848. * @return \Illuminate\Http\RedirectResponse
  7849. * @static
  7850. */
  7851. public static function route($route, $parameters = array(), $status = 302, $headers = array()){
  7852. return \Illuminate\Routing\Redirector::route($route, $parameters, $status, $headers);
  7853. }
  7854. /**
  7855. * Create a new redirect response to a controller action.
  7856. *
  7857. * @param string $action
  7858. * @param array $parameters
  7859. * @param int $status
  7860. * @param array $headers
  7861. * @return \Illuminate\Http\RedirectResponse
  7862. * @static
  7863. */
  7864. public static function action($action, $parameters = array(), $status = 302, $headers = array()){
  7865. return \Illuminate\Routing\Redirector::action($action, $parameters, $status, $headers);
  7866. }
  7867. /**
  7868. * Get the URL generator instance.
  7869. *
  7870. * @return \Illuminate\Routing\UrlGenerator
  7871. * @static
  7872. */
  7873. public static function getUrlGenerator(){
  7874. return \Illuminate\Routing\Redirector::getUrlGenerator();
  7875. }
  7876. /**
  7877. * Set the active session store.
  7878. *
  7879. * @param \Illuminate\Session\Store $session
  7880. * @return void
  7881. * @static
  7882. */
  7883. public static function setSession($session){
  7884. \Illuminate\Routing\Redirector::setSession($session);
  7885. }
  7886. }
  7887. class Redis extends \Illuminate\Support\Facades\Redis{
  7888. /**
  7889. * Get a specific Redis connection instance.
  7890. *
  7891. * @param string $name
  7892. * @return \Predis\ClientInterface
  7893. * @static
  7894. */
  7895. public static function connection($name = 'default'){
  7896. return \Illuminate\Redis\Database::connection($name);
  7897. }
  7898. /**
  7899. * Run a command against the Redis database.
  7900. *
  7901. * @param string $method
  7902. * @param array $parameters
  7903. * @return mixed
  7904. * @static
  7905. */
  7906. public static function command($method, $parameters = array()){
  7907. return \Illuminate\Redis\Database::command($method, $parameters);
  7908. }
  7909. }
  7910. class Request extends \Illuminate\Support\Facades\Request{
  7911. /**
  7912. * Return the Request instance.
  7913. *
  7914. * @return $this
  7915. * @static
  7916. */
  7917. public static function instance(){
  7918. return \Illuminate\Http\Request::instance();
  7919. }
  7920. /**
  7921. * Get the request method.
  7922. *
  7923. * @return string
  7924. * @static
  7925. */
  7926. public static function method(){
  7927. return \Illuminate\Http\Request::method();
  7928. }
  7929. /**
  7930. * Get the root URL for the application.
  7931. *
  7932. * @return string
  7933. * @static
  7934. */
  7935. public static function root(){
  7936. return \Illuminate\Http\Request::root();
  7937. }
  7938. /**
  7939. * Get the URL (no query string) for the request.
  7940. *
  7941. * @return string
  7942. * @static
  7943. */
  7944. public static function url(){
  7945. return \Illuminate\Http\Request::url();
  7946. }
  7947. /**
  7948. * Get the full URL for the request.
  7949. *
  7950. * @return string
  7951. * @static
  7952. */
  7953. public static function fullUrl(){
  7954. return \Illuminate\Http\Request::fullUrl();
  7955. }
  7956. /**
  7957. * Get the current path info for the request.
  7958. *
  7959. * @return string
  7960. * @static
  7961. */
  7962. public static function path(){
  7963. return \Illuminate\Http\Request::path();
  7964. }
  7965. /**
  7966. * Get the current encoded path info for the request.
  7967. *
  7968. * @return string
  7969. * @static
  7970. */
  7971. public static function decodedPath(){
  7972. return \Illuminate\Http\Request::decodedPath();
  7973. }
  7974. /**
  7975. * Get a segment from the URI (1 based index).
  7976. *
  7977. * @param string $index
  7978. * @param mixed $default
  7979. * @return string
  7980. * @static
  7981. */
  7982. public static function segment($index, $default = null){
  7983. return \Illuminate\Http\Request::segment($index, $default);
  7984. }
  7985. /**
  7986. * Get all of the segments for the request path.
  7987. *
  7988. * @return array
  7989. * @static
  7990. */
  7991. public static function segments(){
  7992. return \Illuminate\Http\Request::segments();
  7993. }
  7994. /**
  7995. * Determine if the current request URI matches a pattern.
  7996. *
  7997. * @param mixed string
  7998. * @return bool
  7999. * @static
  8000. */
  8001. public static function is(){
  8002. return \Illuminate\Http\Request::is();
  8003. }
  8004. /**
  8005. * Determine if the request is the result of an AJAX call.
  8006. *
  8007. * @return bool
  8008. * @static
  8009. */
  8010. public static function ajax(){
  8011. return \Illuminate\Http\Request::ajax();
  8012. }
  8013. /**
  8014. * Determine if the request is over HTTPS.
  8015. *
  8016. * @return bool
  8017. * @static
  8018. */
  8019. public static function secure(){
  8020. return \Illuminate\Http\Request::secure();
  8021. }
  8022. /**
  8023. * Returns the client IP address.
  8024. *
  8025. * @return string
  8026. * @static
  8027. */
  8028. public static function ip(){
  8029. return \Illuminate\Http\Request::ip();
  8030. }
  8031. /**
  8032. * Returns the client IP addresses.
  8033. *
  8034. * @return array
  8035. * @static
  8036. */
  8037. public static function ips(){
  8038. return \Illuminate\Http\Request::ips();
  8039. }
  8040. /**
  8041. * Determine if the request contains a given input item key.
  8042. *
  8043. * @param string|array $key
  8044. * @return bool
  8045. * @static
  8046. */
  8047. public static function exists($key){
  8048. return \Illuminate\Http\Request::exists($key);
  8049. }
  8050. /**
  8051. * Determine if the request contains a non-empty value for an input item.
  8052. *
  8053. * @param string|array $key
  8054. * @return bool
  8055. * @static
  8056. */
  8057. public static function has($key){
  8058. return \Illuminate\Http\Request::has($key);
  8059. }
  8060. /**
  8061. * Get all of the input and files for the request.
  8062. *
  8063. * @return array
  8064. * @static
  8065. */
  8066. public static function all(){
  8067. return \Illuminate\Http\Request::all();
  8068. }
  8069. /**
  8070. * Retrieve an input item from the request.
  8071. *
  8072. * @param string $key
  8073. * @param mixed $default
  8074. * @return string
  8075. * @static
  8076. */
  8077. public static function input($key = null, $default = null){
  8078. return \Illuminate\Http\Request::input($key, $default);
  8079. }
  8080. /**
  8081. * Get a subset of the items from the input data.
  8082. *
  8083. * @param array $keys
  8084. * @return array
  8085. * @static
  8086. */
  8087. public static function only($keys){
  8088. return \Illuminate\Http\Request::only($keys);
  8089. }
  8090. /**
  8091. * Get all of the input except for a specified array of items.
  8092. *
  8093. * @param array $keys
  8094. * @return array
  8095. * @static
  8096. */
  8097. public static function except($keys){
  8098. return \Illuminate\Http\Request::except($keys);
  8099. }
  8100. /**
  8101. * Retrieve a query string item from the request.
  8102. *
  8103. * @param string $key
  8104. * @param mixed $default
  8105. * @return string
  8106. * @static
  8107. */
  8108. public static function query($key = null, $default = null){
  8109. return \Illuminate\Http\Request::query($key, $default);
  8110. }
  8111. /**
  8112. * Determine if a cookie is set on the request.
  8113. *
  8114. * @param string $key
  8115. * @return bool
  8116. * @static
  8117. */
  8118. public static function hasCookie($key){
  8119. return \Illuminate\Http\Request::hasCookie($key);
  8120. }
  8121. /**
  8122. * Retrieve a cookie from the request.
  8123. *
  8124. * @param string $key
  8125. * @param mixed $default
  8126. * @return string
  8127. * @static
  8128. */
  8129. public static function cookie($key = null, $default = null){
  8130. return \Illuminate\Http\Request::cookie($key, $default);
  8131. }
  8132. /**
  8133. * Retrieve a file from the request.
  8134. *
  8135. * @param string $key
  8136. * @param mixed $default
  8137. * @return \Symfony\Component\HttpFoundation\File\UploadedFile|array
  8138. * @static
  8139. */
  8140. public static function file($key = null, $default = null){
  8141. return \Illuminate\Http\Request::file($key, $default);
  8142. }
  8143. /**
  8144. * Determine if the uploaded data contains a file.
  8145. *
  8146. * @param string $key
  8147. * @return bool
  8148. * @static
  8149. */
  8150. public static function hasFile($key){
  8151. return \Illuminate\Http\Request::hasFile($key);
  8152. }
  8153. /**
  8154. * Retrieve a header from the request.
  8155. *
  8156. * @param string $key
  8157. * @param mixed $default
  8158. * @return string
  8159. * @static
  8160. */
  8161. public static function header($key = null, $default = null){
  8162. return \Illuminate\Http\Request::header($key, $default);
  8163. }
  8164. /**
  8165. * Retrieve a server variable from the request.
  8166. *
  8167. * @param string $key
  8168. * @param mixed $default
  8169. * @return string
  8170. * @static
  8171. */
  8172. public static function server($key = null, $default = null){
  8173. return \Illuminate\Http\Request::server($key, $default);
  8174. }
  8175. /**
  8176. * Retrieve an old input item.
  8177. *
  8178. * @param string $key
  8179. * @param mixed $default
  8180. * @return mixed
  8181. * @static
  8182. */
  8183. public static function old($key = null, $default = null){
  8184. return \Illuminate\Http\Request::old($key, $default);
  8185. }
  8186. /**
  8187. * Flash the input for the current request to the session.
  8188. *
  8189. * @param string $filter
  8190. * @param array $keys
  8191. * @return void
  8192. * @static
  8193. */
  8194. public static function flash($filter = null, $keys = array()){
  8195. \Illuminate\Http\Request::flash($filter, $keys);
  8196. }
  8197. /**
  8198. * Flash only some of the input to the session.
  8199. *
  8200. * @param mixed string
  8201. * @return void
  8202. * @static
  8203. */
  8204. public static function flashOnly($keys){
  8205. \Illuminate\Http\Request::flashOnly($keys);
  8206. }
  8207. /**
  8208. * Flash only some of the input to the session.
  8209. *
  8210. * @param mixed string
  8211. * @return void
  8212. * @static
  8213. */
  8214. public static function flashExcept($keys){
  8215. \Illuminate\Http\Request::flashExcept($keys);
  8216. }
  8217. /**
  8218. * Flush all of the old input from the session.
  8219. *
  8220. * @return void
  8221. * @static
  8222. */
  8223. public static function flush(){
  8224. \Illuminate\Http\Request::flush();
  8225. }
  8226. /**
  8227. * Merge new input into the current request's input array.
  8228. *
  8229. * @param array $input
  8230. * @return void
  8231. * @static
  8232. */
  8233. public static function merge($input){
  8234. \Illuminate\Http\Request::merge($input);
  8235. }
  8236. /**
  8237. * Replace the input for the current request.
  8238. *
  8239. * @param array $input
  8240. * @return void
  8241. * @static
  8242. */
  8243. public static function replace($input){
  8244. \Illuminate\Http\Request::replace($input);
  8245. }
  8246. /**
  8247. * Get the JSON payload for the request.
  8248. *
  8249. * @param string $key
  8250. * @param mixed $default
  8251. * @return mixed
  8252. * @static
  8253. */
  8254. public static function json($key = null, $default = null){
  8255. return \Illuminate\Http\Request::json($key, $default);
  8256. }
  8257. /**
  8258. * Determine if the request is sending JSON.
  8259. *
  8260. * @return bool
  8261. * @static
  8262. */
  8263. public static function isJson(){
  8264. return \Illuminate\Http\Request::isJson();
  8265. }
  8266. /**
  8267. * Determine if the current request is asking for JSON in return.
  8268. *
  8269. * @return bool
  8270. * @static
  8271. */
  8272. public static function wantsJson(){
  8273. return \Illuminate\Http\Request::wantsJson();
  8274. }
  8275. /**
  8276. * Get the data format expected in the response.
  8277. *
  8278. * @param string $default
  8279. * @return string
  8280. * @static
  8281. */
  8282. public static function format($default = 'html'){
  8283. return \Illuminate\Http\Request::format($default);
  8284. }
  8285. /**
  8286. * Create an Illuminate request from a Symfony instance.
  8287. *
  8288. * @param \Symfony\Component\HttpFoundation\Request $request
  8289. * @return \Illuminate\Http\Request
  8290. * @static
  8291. */
  8292. public static function createFromBase($request){
  8293. return \Illuminate\Http\Request::createFromBase($request);
  8294. }
  8295. /**
  8296. * Get the session associated with the request.
  8297. *
  8298. * @return \Illuminate\Session\Store
  8299. * @throws \RuntimeException
  8300. * @static
  8301. */
  8302. public static function session(){
  8303. return \Illuminate\Http\Request::session();
  8304. }
  8305. /**
  8306. * Sets the parameters for this request.
  8307. *
  8308. * This method also re-initializes all properties.
  8309. *
  8310. * @param array $query The GET parameters
  8311. * @param array $request The POST parameters
  8312. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  8313. * @param array $cookies The COOKIE parameters
  8314. * @param array $files The FILES parameters
  8315. * @param array $server The SERVER parameters
  8316. * @param string $content The raw body data
  8317. * @api
  8318. * @static
  8319. */
  8320. public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){
  8321. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8322. return \Illuminate\Http\Request::initialize($query, $request, $attributes, $cookies, $files, $server, $content);
  8323. }
  8324. /**
  8325. * Creates a new request with values from PHP's super globals.
  8326. *
  8327. * @return \Symfony\Component\HttpFoundation\Request A new request
  8328. * @api
  8329. * @static
  8330. */
  8331. public static function createFromGlobals(){
  8332. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8333. return \Illuminate\Http\Request::createFromGlobals();
  8334. }
  8335. /**
  8336. * Creates a Request based on a given URI and configuration.
  8337. *
  8338. * The information contained in the URI always take precedence
  8339. * over the other information (server and parameters).
  8340. *
  8341. * @param string $uri The URI
  8342. * @param string $method The HTTP method
  8343. * @param array $parameters The query (GET) or request (POST) parameters
  8344. * @param array $cookies The request cookies ($_COOKIE)
  8345. * @param array $files The request files ($_FILES)
  8346. * @param array $server The server parameters ($_SERVER)
  8347. * @param string $content The raw body data
  8348. * @return \Symfony\Component\HttpFoundation\Request A Request instance
  8349. * @api
  8350. * @static
  8351. */
  8352. public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){
  8353. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8354. return \Illuminate\Http\Request::create($uri, $method, $parameters, $cookies, $files, $server, $content);
  8355. }
  8356. /**
  8357. * Sets a callable able to create a Request instance.
  8358. *
  8359. * This is mainly useful when you need to override the Request class
  8360. * to keep BC with an existing system. It should not be used for any
  8361. * other purpose.
  8362. *
  8363. * @param callable|null $callable A PHP callable
  8364. * @static
  8365. */
  8366. public static function setFactory($callable){
  8367. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8368. return \Illuminate\Http\Request::setFactory($callable);
  8369. }
  8370. /**
  8371. * Clones a request and overrides some of its parameters.
  8372. *
  8373. * @param array $query The GET parameters
  8374. * @param array $request The POST parameters
  8375. * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...)
  8376. * @param array $cookies The COOKIE parameters
  8377. * @param array $files The FILES parameters
  8378. * @param array $server The SERVER parameters
  8379. * @return \Symfony\Component\HttpFoundation\Request The duplicated request
  8380. * @api
  8381. * @static
  8382. */
  8383. public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){
  8384. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8385. return \Illuminate\Http\Request::duplicate($query, $request, $attributes, $cookies, $files, $server);
  8386. }
  8387. /**
  8388. * Overrides the PHP global variables according to this request instance.
  8389. *
  8390. * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
  8391. * $_FILES is never overridden, see rfc1867
  8392. *
  8393. * @api
  8394. * @static
  8395. */
  8396. public static function overrideGlobals(){
  8397. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8398. return \Illuminate\Http\Request::overrideGlobals();
  8399. }
  8400. /**
  8401. * Sets a list of trusted proxies.
  8402. *
  8403. * You should only list the reverse proxies that you manage directly.
  8404. *
  8405. * @param array $proxies A list of trusted proxies
  8406. * @api
  8407. * @static
  8408. */
  8409. public static function setTrustedProxies($proxies){
  8410. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8411. return \Illuminate\Http\Request::setTrustedProxies($proxies);
  8412. }
  8413. /**
  8414. * Gets the list of trusted proxies.
  8415. *
  8416. * @return array An array of trusted proxies.
  8417. * @static
  8418. */
  8419. public static function getTrustedProxies(){
  8420. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8421. return \Illuminate\Http\Request::getTrustedProxies();
  8422. }
  8423. /**
  8424. * Sets a list of trusted host patterns.
  8425. *
  8426. * You should only list the hosts you manage using regexs.
  8427. *
  8428. * @param array $hostPatterns A list of trusted host patterns
  8429. * @static
  8430. */
  8431. public static function setTrustedHosts($hostPatterns){
  8432. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8433. return \Illuminate\Http\Request::setTrustedHosts($hostPatterns);
  8434. }
  8435. /**
  8436. * Gets the list of trusted host patterns.
  8437. *
  8438. * @return array An array of trusted host patterns.
  8439. * @static
  8440. */
  8441. public static function getTrustedHosts(){
  8442. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8443. return \Illuminate\Http\Request::getTrustedHosts();
  8444. }
  8445. /**
  8446. * Sets the name for trusted headers.
  8447. *
  8448. * The following header keys are supported:
  8449. *
  8450. * * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp())
  8451. * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost())
  8452. * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort())
  8453. * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure())
  8454. *
  8455. * Setting an empty value allows to disable the trusted header for the given key.
  8456. *
  8457. * @param string $key The header key
  8458. * @param string $value The header name
  8459. * @throws \InvalidArgumentException
  8460. * @static
  8461. */
  8462. public static function setTrustedHeaderName($key, $value){
  8463. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8464. return \Illuminate\Http\Request::setTrustedHeaderName($key, $value);
  8465. }
  8466. /**
  8467. * Gets the trusted proxy header name.
  8468. *
  8469. * @param string $key The header key
  8470. * @return string The header name
  8471. * @throws \InvalidArgumentException
  8472. * @static
  8473. */
  8474. public static function getTrustedHeaderName($key){
  8475. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8476. return \Illuminate\Http\Request::getTrustedHeaderName($key);
  8477. }
  8478. /**
  8479. * Normalizes a query string.
  8480. *
  8481. * It builds a normalized query string, where keys/value pairs are alphabetized,
  8482. * have consistent escaping and unneeded delimiters are removed.
  8483. *
  8484. * @param string $qs Query string
  8485. * @return string A normalized query string for the Request
  8486. * @static
  8487. */
  8488. public static function normalizeQueryString($qs){
  8489. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8490. return \Illuminate\Http\Request::normalizeQueryString($qs);
  8491. }
  8492. /**
  8493. * Enables support for the _method request parameter to determine the intended HTTP method.
  8494. *
  8495. * Be warned that enabling this feature might lead to CSRF issues in your code.
  8496. * Check that you are using CSRF tokens when required.
  8497. * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered
  8498. * and used to send a "PUT" or "DELETE" request via the _method request parameter.
  8499. * If these methods are not protected against CSRF, this presents a possible vulnerability.
  8500. *
  8501. * The HTTP method can only be overridden when the real HTTP method is POST.
  8502. *
  8503. * @static
  8504. */
  8505. public static function enableHttpMethodParameterOverride(){
  8506. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8507. return \Illuminate\Http\Request::enableHttpMethodParameterOverride();
  8508. }
  8509. /**
  8510. * Checks whether support for the _method request parameter is enabled.
  8511. *
  8512. * @return bool True when the _method request parameter is enabled, false otherwise
  8513. * @static
  8514. */
  8515. public static function getHttpMethodParameterOverride(){
  8516. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8517. return \Illuminate\Http\Request::getHttpMethodParameterOverride();
  8518. }
  8519. /**
  8520. * Gets a "parameter" value.
  8521. *
  8522. * This method is mainly useful for libraries that want to provide some flexibility.
  8523. *
  8524. * Order of precedence: GET, PATH, POST
  8525. *
  8526. * Avoid using this method in controllers:
  8527. *
  8528. * * slow
  8529. * * prefer to get from a "named" source
  8530. *
  8531. * It is better to explicitly get request parameters from the appropriate
  8532. * public property instead (query, attributes, request).
  8533. *
  8534. * @param string $key the key
  8535. * @param mixed $default the default value
  8536. * @param bool $deep is parameter deep in multidimensional array
  8537. * @return mixed
  8538. * @static
  8539. */
  8540. public static function get($key, $default = null, $deep = false){
  8541. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8542. return \Illuminate\Http\Request::get($key, $default, $deep);
  8543. }
  8544. /**
  8545. * Gets the Session.
  8546. *
  8547. * @return \Symfony\Component\HttpFoundation\SessionInterface|null The session
  8548. * @api
  8549. * @static
  8550. */
  8551. public static function getSession(){
  8552. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8553. return \Illuminate\Http\Request::getSession();
  8554. }
  8555. /**
  8556. * Whether the request contains a Session which was started in one of the
  8557. * previous requests.
  8558. *
  8559. * @return bool
  8560. * @api
  8561. * @static
  8562. */
  8563. public static function hasPreviousSession(){
  8564. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8565. return \Illuminate\Http\Request::hasPreviousSession();
  8566. }
  8567. /**
  8568. * Whether the request contains a Session object.
  8569. *
  8570. * This method does not give any information about the state of the session object,
  8571. * like whether the session is started or not. It is just a way to check if this Request
  8572. * is associated with a Session instance.
  8573. *
  8574. * @return bool true when the Request contains a Session object, false otherwise
  8575. * @api
  8576. * @static
  8577. */
  8578. public static function hasSession(){
  8579. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8580. return \Illuminate\Http\Request::hasSession();
  8581. }
  8582. /**
  8583. * Sets the Session.
  8584. *
  8585. * @param \Symfony\Component\HttpFoundation\SessionInterface $session The Session
  8586. * @api
  8587. * @static
  8588. */
  8589. public static function setSession($session){
  8590. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8591. return \Illuminate\Http\Request::setSession($session);
  8592. }
  8593. /**
  8594. * Returns the client IP addresses.
  8595. *
  8596. * In the returned array the most trusted IP address is first, and the
  8597. * least trusted one last. The "real" client IP address is the last one,
  8598. * but this is also the least trusted one. Trusted proxies are stripped.
  8599. *
  8600. * Use this method carefully; you should use getClientIp() instead.
  8601. *
  8602. * @return array The client IP addresses
  8603. * @see getClientIp()
  8604. * @static
  8605. */
  8606. public static function getClientIps(){
  8607. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8608. return \Illuminate\Http\Request::getClientIps();
  8609. }
  8610. /**
  8611. * Returns the client IP address.
  8612. *
  8613. * This method can read the client IP address from the "X-Forwarded-For" header
  8614. * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For"
  8615. * header value is a comma+space separated list of IP addresses, the left-most
  8616. * being the original client, and each successive proxy that passed the request
  8617. * adding the IP address where it received the request from.
  8618. *
  8619. * If your reverse proxy uses a different header name than "X-Forwarded-For",
  8620. * ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with
  8621. * the "client-ip" key.
  8622. *
  8623. * @return string The client IP address
  8624. * @see getClientIps()
  8625. * @see http://en.wikipedia.org/wiki/X-Forwarded-For
  8626. * @api
  8627. * @static
  8628. */
  8629. public static function getClientIp(){
  8630. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8631. return \Illuminate\Http\Request::getClientIp();
  8632. }
  8633. /**
  8634. * Returns current script name.
  8635. *
  8636. * @return string
  8637. * @api
  8638. * @static
  8639. */
  8640. public static function getScriptName(){
  8641. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8642. return \Illuminate\Http\Request::getScriptName();
  8643. }
  8644. /**
  8645. * Returns the path being requested relative to the executed script.
  8646. *
  8647. * The path info always starts with a /.
  8648. *
  8649. * Suppose this request is instantiated from /mysite on localhost:
  8650. *
  8651. * * http://localhost/mysite returns an empty string
  8652. * * http://localhost/mysite/about returns '/about'
  8653. * * http://localhost/mysite/enco%20ded returns '/enco%20ded'
  8654. * * http://localhost/mysite/about?var=1 returns '/about'
  8655. *
  8656. * @return string The raw path (i.e. not urldecoded)
  8657. * @api
  8658. * @static
  8659. */
  8660. public static function getPathInfo(){
  8661. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8662. return \Illuminate\Http\Request::getPathInfo();
  8663. }
  8664. /**
  8665. * Returns the root path from which this request is executed.
  8666. *
  8667. * Suppose that an index.php file instantiates this request object:
  8668. *
  8669. * * http://localhost/index.php returns an empty string
  8670. * * http://localhost/index.php/page returns an empty string
  8671. * * http://localhost/web/index.php returns '/web'
  8672. * * http://localhost/we%20b/index.php returns '/we%20b'
  8673. *
  8674. * @return string The raw path (i.e. not urldecoded)
  8675. * @api
  8676. * @static
  8677. */
  8678. public static function getBasePath(){
  8679. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8680. return \Illuminate\Http\Request::getBasePath();
  8681. }
  8682. /**
  8683. * Returns the root URL from which this request is executed.
  8684. *
  8685. * The base URL never ends with a /.
  8686. *
  8687. * This is similar to getBasePath(), except that it also includes the
  8688. * script filename (e.g. index.php) if one exists.
  8689. *
  8690. * @return string The raw URL (i.e. not urldecoded)
  8691. * @api
  8692. * @static
  8693. */
  8694. public static function getBaseUrl(){
  8695. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8696. return \Illuminate\Http\Request::getBaseUrl();
  8697. }
  8698. /**
  8699. * Gets the request's scheme.
  8700. *
  8701. * @return string
  8702. * @api
  8703. * @static
  8704. */
  8705. public static function getScheme(){
  8706. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8707. return \Illuminate\Http\Request::getScheme();
  8708. }
  8709. /**
  8710. * Returns the port on which the request is made.
  8711. *
  8712. * This method can read the client port from the "X-Forwarded-Port" header
  8713. * when trusted proxies were set via "setTrustedProxies()".
  8714. *
  8715. * The "X-Forwarded-Port" header must contain the client port.
  8716. *
  8717. * If your reverse proxy uses a different header name than "X-Forwarded-Port",
  8718. * configure it via "setTrustedHeaderName()" with the "client-port" key.
  8719. *
  8720. * @return string
  8721. * @api
  8722. * @static
  8723. */
  8724. public static function getPort(){
  8725. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8726. return \Illuminate\Http\Request::getPort();
  8727. }
  8728. /**
  8729. * Returns the user.
  8730. *
  8731. * @return string|null
  8732. * @static
  8733. */
  8734. public static function getUser(){
  8735. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8736. return \Illuminate\Http\Request::getUser();
  8737. }
  8738. /**
  8739. * Returns the password.
  8740. *
  8741. * @return string|null
  8742. * @static
  8743. */
  8744. public static function getPassword(){
  8745. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8746. return \Illuminate\Http\Request::getPassword();
  8747. }
  8748. /**
  8749. * Gets the user info.
  8750. *
  8751. * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server
  8752. * @static
  8753. */
  8754. public static function getUserInfo(){
  8755. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8756. return \Illuminate\Http\Request::getUserInfo();
  8757. }
  8758. /**
  8759. * Returns the HTTP host being requested.
  8760. *
  8761. * The port name will be appended to the host if it's non-standard.
  8762. *
  8763. * @return string
  8764. * @api
  8765. * @static
  8766. */
  8767. public static function getHttpHost(){
  8768. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8769. return \Illuminate\Http\Request::getHttpHost();
  8770. }
  8771. /**
  8772. * Returns the requested URI (path and query string).
  8773. *
  8774. * @return string The raw URI (i.e. not URI decoded)
  8775. * @api
  8776. * @static
  8777. */
  8778. public static function getRequestUri(){
  8779. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8780. return \Illuminate\Http\Request::getRequestUri();
  8781. }
  8782. /**
  8783. * Gets the scheme and HTTP host.
  8784. *
  8785. * If the URL was called with basic authentication, the user
  8786. * and the password are not added to the generated string.
  8787. *
  8788. * @return string The scheme and HTTP host
  8789. * @static
  8790. */
  8791. public static function getSchemeAndHttpHost(){
  8792. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8793. return \Illuminate\Http\Request::getSchemeAndHttpHost();
  8794. }
  8795. /**
  8796. * Generates a normalized URI (URL) for the Request.
  8797. *
  8798. * @return string A normalized URI (URL) for the Request
  8799. * @see getQueryString()
  8800. * @api
  8801. * @static
  8802. */
  8803. public static function getUri(){
  8804. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8805. return \Illuminate\Http\Request::getUri();
  8806. }
  8807. /**
  8808. * Generates a normalized URI for the given path.
  8809. *
  8810. * @param string $path A path to use instead of the current one
  8811. * @return string The normalized URI for the path
  8812. * @api
  8813. * @static
  8814. */
  8815. public static function getUriForPath($path){
  8816. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8817. return \Illuminate\Http\Request::getUriForPath($path);
  8818. }
  8819. /**
  8820. * Generates the normalized query string for the Request.
  8821. *
  8822. * It builds a normalized query string, where keys/value pairs are alphabetized
  8823. * and have consistent escaping.
  8824. *
  8825. * @return string|null A normalized query string for the Request
  8826. * @api
  8827. * @static
  8828. */
  8829. public static function getQueryString(){
  8830. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8831. return \Illuminate\Http\Request::getQueryString();
  8832. }
  8833. /**
  8834. * Checks whether the request is secure or not.
  8835. *
  8836. * This method can read the client port from the "X-Forwarded-Proto" header
  8837. * when trusted proxies were set via "setTrustedProxies()".
  8838. *
  8839. * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
  8840. *
  8841. * If your reverse proxy uses a different header name than "X-Forwarded-Proto"
  8842. * ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with
  8843. * the "client-proto" key.
  8844. *
  8845. * @return bool
  8846. * @api
  8847. * @static
  8848. */
  8849. public static function isSecure(){
  8850. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8851. return \Illuminate\Http\Request::isSecure();
  8852. }
  8853. /**
  8854. * Returns the host name.
  8855. *
  8856. * This method can read the client port from the "X-Forwarded-Host" header
  8857. * when trusted proxies were set via "setTrustedProxies()".
  8858. *
  8859. * The "X-Forwarded-Host" header must contain the client host name.
  8860. *
  8861. * If your reverse proxy uses a different header name than "X-Forwarded-Host",
  8862. * configure it via "setTrustedHeaderName()" with the "client-host" key.
  8863. *
  8864. * @return string
  8865. * @throws \UnexpectedValueException when the host name is invalid
  8866. * @api
  8867. * @static
  8868. */
  8869. public static function getHost(){
  8870. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8871. return \Illuminate\Http\Request::getHost();
  8872. }
  8873. /**
  8874. * Sets the request method.
  8875. *
  8876. * @param string $method
  8877. * @api
  8878. * @static
  8879. */
  8880. public static function setMethod($method){
  8881. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8882. return \Illuminate\Http\Request::setMethod($method);
  8883. }
  8884. /**
  8885. * Gets the request "intended" method.
  8886. *
  8887. * If the X-HTTP-Method-Override header is set, and if the method is a POST,
  8888. * then it is used to determine the "real" intended HTTP method.
  8889. *
  8890. * The _method request parameter can also be used to determine the HTTP method,
  8891. * but only if enableHttpMethodParameterOverride() has been called.
  8892. *
  8893. * The method is always an uppercased string.
  8894. *
  8895. * @return string The request method
  8896. * @api
  8897. * @see getRealMethod()
  8898. * @static
  8899. */
  8900. public static function getMethod(){
  8901. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8902. return \Illuminate\Http\Request::getMethod();
  8903. }
  8904. /**
  8905. * Gets the "real" request method.
  8906. *
  8907. * @return string The request method
  8908. * @see getMethod()
  8909. * @static
  8910. */
  8911. public static function getRealMethod(){
  8912. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8913. return \Illuminate\Http\Request::getRealMethod();
  8914. }
  8915. /**
  8916. * Gets the mime type associated with the format.
  8917. *
  8918. * @param string $format The format
  8919. * @return string The associated mime type (null if not found)
  8920. * @api
  8921. * @static
  8922. */
  8923. public static function getMimeType($format){
  8924. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8925. return \Illuminate\Http\Request::getMimeType($format);
  8926. }
  8927. /**
  8928. * Gets the format associated with the mime type.
  8929. *
  8930. * @param string $mimeType The associated mime type
  8931. * @return string|null The format (null if not found)
  8932. * @api
  8933. * @static
  8934. */
  8935. public static function getFormat($mimeType){
  8936. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8937. return \Illuminate\Http\Request::getFormat($mimeType);
  8938. }
  8939. /**
  8940. * Associates a format with mime types.
  8941. *
  8942. * @param string $format The format
  8943. * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
  8944. * @api
  8945. * @static
  8946. */
  8947. public static function setFormat($format, $mimeTypes){
  8948. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8949. return \Illuminate\Http\Request::setFormat($format, $mimeTypes);
  8950. }
  8951. /**
  8952. * Gets the request format.
  8953. *
  8954. * Here is the process to determine the format:
  8955. *
  8956. * * format defined by the user (with setRequestFormat())
  8957. * * _format request parameter
  8958. * * $default
  8959. *
  8960. * @param string $default The default format
  8961. * @return string The request format
  8962. * @api
  8963. * @static
  8964. */
  8965. public static function getRequestFormat($default = 'html'){
  8966. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8967. return \Illuminate\Http\Request::getRequestFormat($default);
  8968. }
  8969. /**
  8970. * Sets the request format.
  8971. *
  8972. * @param string $format The request format.
  8973. * @api
  8974. * @static
  8975. */
  8976. public static function setRequestFormat($format){
  8977. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8978. return \Illuminate\Http\Request::setRequestFormat($format);
  8979. }
  8980. /**
  8981. * Gets the format associated with the request.
  8982. *
  8983. * @return string|null The format (null if no content type is present)
  8984. * @api
  8985. * @static
  8986. */
  8987. public static function getContentType(){
  8988. //Method inherited from \Symfony\Component\HttpFoundation\Request
  8989. return \Illuminate\Http\Request::getContentType();
  8990. }
  8991. /**
  8992. * Sets the default locale.
  8993. *
  8994. * @param string $locale
  8995. * @api
  8996. * @static
  8997. */
  8998. public static function setDefaultLocale($locale){
  8999. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9000. return \Illuminate\Http\Request::setDefaultLocale($locale);
  9001. }
  9002. /**
  9003. * Get the default locale.
  9004. *
  9005. * @return string
  9006. * @static
  9007. */
  9008. public static function getDefaultLocale(){
  9009. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9010. return \Illuminate\Http\Request::getDefaultLocale();
  9011. }
  9012. /**
  9013. * Sets the locale.
  9014. *
  9015. * @param string $locale
  9016. * @api
  9017. * @static
  9018. */
  9019. public static function setLocale($locale){
  9020. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9021. return \Illuminate\Http\Request::setLocale($locale);
  9022. }
  9023. /**
  9024. * Get the locale.
  9025. *
  9026. * @return string
  9027. * @static
  9028. */
  9029. public static function getLocale(){
  9030. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9031. return \Illuminate\Http\Request::getLocale();
  9032. }
  9033. /**
  9034. * Checks if the request method is of specified type.
  9035. *
  9036. * @param string $method Uppercase request method (GET, POST etc).
  9037. * @return bool
  9038. * @static
  9039. */
  9040. public static function isMethod($method){
  9041. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9042. return \Illuminate\Http\Request::isMethod($method);
  9043. }
  9044. /**
  9045. * Checks whether the method is safe or not.
  9046. *
  9047. * @return bool
  9048. * @api
  9049. * @static
  9050. */
  9051. public static function isMethodSafe(){
  9052. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9053. return \Illuminate\Http\Request::isMethodSafe();
  9054. }
  9055. /**
  9056. * Returns the request body content.
  9057. *
  9058. * @param bool $asResource If true, a resource will be returned
  9059. * @return string|resource The request body content or a resource to read the body stream.
  9060. * @throws \LogicException
  9061. * @static
  9062. */
  9063. public static function getContent($asResource = false){
  9064. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9065. return \Illuminate\Http\Request::getContent($asResource);
  9066. }
  9067. /**
  9068. * Gets the Etags.
  9069. *
  9070. * @return array The entity tags
  9071. * @static
  9072. */
  9073. public static function getETags(){
  9074. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9075. return \Illuminate\Http\Request::getETags();
  9076. }
  9077. /**
  9078. *
  9079. *
  9080. * @return bool
  9081. * @static
  9082. */
  9083. public static function isNoCache(){
  9084. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9085. return \Illuminate\Http\Request::isNoCache();
  9086. }
  9087. /**
  9088. * Returns the preferred language.
  9089. *
  9090. * @param array $locales An array of ordered available locales
  9091. * @return string|null The preferred locale
  9092. * @api
  9093. * @static
  9094. */
  9095. public static function getPreferredLanguage($locales = null){
  9096. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9097. return \Illuminate\Http\Request::getPreferredLanguage($locales);
  9098. }
  9099. /**
  9100. * Gets a list of languages acceptable by the client browser.
  9101. *
  9102. * @return array Languages ordered in the user browser preferences
  9103. * @api
  9104. * @static
  9105. */
  9106. public static function getLanguages(){
  9107. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9108. return \Illuminate\Http\Request::getLanguages();
  9109. }
  9110. /**
  9111. * Gets a list of charsets acceptable by the client browser.
  9112. *
  9113. * @return array List of charsets in preferable order
  9114. * @api
  9115. * @static
  9116. */
  9117. public static function getCharsets(){
  9118. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9119. return \Illuminate\Http\Request::getCharsets();
  9120. }
  9121. /**
  9122. * Gets a list of encodings acceptable by the client browser.
  9123. *
  9124. * @return array List of encodings in preferable order
  9125. * @static
  9126. */
  9127. public static function getEncodings(){
  9128. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9129. return \Illuminate\Http\Request::getEncodings();
  9130. }
  9131. /**
  9132. * Gets a list of content types acceptable by the client browser.
  9133. *
  9134. * @return array List of content types in preferable order
  9135. * @api
  9136. * @static
  9137. */
  9138. public static function getAcceptableContentTypes(){
  9139. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9140. return \Illuminate\Http\Request::getAcceptableContentTypes();
  9141. }
  9142. /**
  9143. * Returns true if the request is a XMLHttpRequest.
  9144. *
  9145. * It works if your JavaScript library sets an X-Requested-With HTTP header.
  9146. * It is known to work with common JavaScript frameworks:
  9147. *
  9148. * @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
  9149. * @return bool true if the request is an XMLHttpRequest, false otherwise
  9150. * @api
  9151. * @static
  9152. */
  9153. public static function isXmlHttpRequest(){
  9154. //Method inherited from \Symfony\Component\HttpFoundation\Request
  9155. return \Illuminate\Http\Request::isXmlHttpRequest();
  9156. }
  9157. }
  9158. class Response extends \Illuminate\Support\Facades\Response{
  9159. }
  9160. class Route extends \Illuminate\Support\Facades\Route{
  9161. /**
  9162. * Register a new GET route with the router.
  9163. *
  9164. * @param string $uri
  9165. * @param \Closure|array|string $action
  9166. * @return \Illuminate\Routing\Route
  9167. * @static
  9168. */
  9169. public static function get($uri, $action){
  9170. return \Illuminate\Routing\Router::get($uri, $action);
  9171. }
  9172. /**
  9173. * Register a new POST route with the router.
  9174. *
  9175. * @param string $uri
  9176. * @param \Closure|array|string $action
  9177. * @return \Illuminate\Routing\Route
  9178. * @static
  9179. */
  9180. public static function post($uri, $action){
  9181. return \Illuminate\Routing\Router::post($uri, $action);
  9182. }
  9183. /**
  9184. * Register a new PUT route with the router.
  9185. *
  9186. * @param string $uri
  9187. * @param \Closure|array|string $action
  9188. * @return \Illuminate\Routing\Route
  9189. * @static
  9190. */
  9191. public static function put($uri, $action){
  9192. return \Illuminate\Routing\Router::put($uri, $action);
  9193. }
  9194. /**
  9195. * Register a new PATCH route with the router.
  9196. *
  9197. * @param string $uri
  9198. * @param \Closure|array|string $action
  9199. * @return \Illuminate\Routing\Route
  9200. * @static
  9201. */
  9202. public static function patch($uri, $action){
  9203. return \Illuminate\Routing\Router::patch($uri, $action);
  9204. }
  9205. /**
  9206. * Register a new DELETE route with the router.
  9207. *
  9208. * @param string $uri
  9209. * @param \Closure|array|string $action
  9210. * @return \Illuminate\Routing\Route
  9211. * @static
  9212. */
  9213. public static function delete($uri, $action){
  9214. return \Illuminate\Routing\Router::delete($uri, $action);
  9215. }
  9216. /**
  9217. * Register a new OPTIONS route with the router.
  9218. *
  9219. * @param string $uri
  9220. * @param \Closure|array|string $action
  9221. * @return \Illuminate\Routing\Route
  9222. * @static
  9223. */
  9224. public static function options($uri, $action){
  9225. return \Illuminate\Routing\Router::options($uri, $action);
  9226. }
  9227. /**
  9228. * Register a new route responding to all verbs.
  9229. *
  9230. * @param string $uri
  9231. * @param \Closure|array|string $action
  9232. * @return \Illuminate\Routing\Route
  9233. * @static
  9234. */
  9235. public static function any($uri, $action){
  9236. return \Illuminate\Routing\Router::any($uri, $action);
  9237. }
  9238. /**
  9239. * Register a new route with the given verbs.
  9240. *
  9241. * @param array|string $methods
  9242. * @param string $uri
  9243. * @param \Closure|array|string $action
  9244. * @return \Illuminate\Routing\Route
  9245. * @static
  9246. */
  9247. public static function match($methods, $uri, $action){
  9248. return \Illuminate\Routing\Router::match($methods, $uri, $action);
  9249. }
  9250. /**
  9251. * Register an array of controllers with wildcard routing.
  9252. *
  9253. * @param array $controllers
  9254. * @return void
  9255. * @static
  9256. */
  9257. public static function controllers($controllers){
  9258. \Illuminate\Routing\Router::controllers($controllers);
  9259. }
  9260. /**
  9261. * Route a controller to a URI with wildcard routing.
  9262. *
  9263. * @param string $uri
  9264. * @param string $controller
  9265. * @param array $names
  9266. * @return void
  9267. * @static
  9268. */
  9269. public static function controller($uri, $controller, $names = array()){
  9270. \Illuminate\Routing\Router::controller($uri, $controller, $names);
  9271. }
  9272. /**
  9273. * Route a resource to a controller.
  9274. *
  9275. * @param string $name
  9276. * @param string $controller
  9277. * @param array $options
  9278. * @return void
  9279. * @static
  9280. */
  9281. public static function resource($name, $controller, $options = array()){
  9282. \Illuminate\Routing\Router::resource($name, $controller, $options);
  9283. }
  9284. /**
  9285. * Get the base resource URI for a given resource.
  9286. *
  9287. * @param string $resource
  9288. * @return string
  9289. * @static
  9290. */
  9291. public static function getResourceUri($resource){
  9292. return \Illuminate\Routing\Router::getResourceUri($resource);
  9293. }
  9294. /**
  9295. * Format a resource wildcard for usage.
  9296. *
  9297. * @param string $value
  9298. * @return string
  9299. * @static
  9300. */
  9301. public static function getResourceWildcard($value){
  9302. return \Illuminate\Routing\Router::getResourceWildcard($value);
  9303. }
  9304. /**
  9305. * Create a route group with shared attributes.
  9306. *
  9307. * @param array $attributes
  9308. * @param \Closure $callback
  9309. * @return void
  9310. * @static
  9311. */
  9312. public static function group($attributes, $callback){
  9313. \Illuminate\Routing\Router::group($attributes, $callback);
  9314. }
  9315. /**
  9316. * Merge the given array with the last group stack.
  9317. *
  9318. * @param array $new
  9319. * @return array
  9320. * @static
  9321. */
  9322. public static function mergeWithLastGroup($new){
  9323. return \Illuminate\Routing\Router::mergeWithLastGroup($new);
  9324. }
  9325. /**
  9326. * Merge the given group attributes.
  9327. *
  9328. * @param array $new
  9329. * @param array $old
  9330. * @return array
  9331. * @static
  9332. */
  9333. public static function mergeGroup($new, $old){
  9334. return \Illuminate\Routing\Router::mergeGroup($new, $old);
  9335. }
  9336. /**
  9337. * Dispatch the request to the application.
  9338. *
  9339. * @param \Illuminate\Http\Request $request
  9340. * @return \Illuminate\Http\Response
  9341. * @static
  9342. */
  9343. public static function dispatch($request){
  9344. return \Illuminate\Routing\Router::dispatch($request);
  9345. }
  9346. /**
  9347. * Dispatch the request to a route and return the response.
  9348. *
  9349. * @param \Illuminate\Http\Request $request
  9350. * @return mixed
  9351. * @static
  9352. */
  9353. public static function dispatchToRoute($request){
  9354. return \Illuminate\Routing\Router::dispatchToRoute($request);
  9355. }
  9356. /**
  9357. * Register a route matched event listener.
  9358. *
  9359. * @param string|callable $callback
  9360. * @return void
  9361. * @static
  9362. */
  9363. public static function matched($callback){
  9364. \Illuminate\Routing\Router::matched($callback);
  9365. }
  9366. /**
  9367. * Register a new "before" filter with the router.
  9368. *
  9369. * @param string|callable $callback
  9370. * @return void
  9371. * @static
  9372. */
  9373. public static function before($callback){
  9374. \Illuminate\Routing\Router::before($callback);
  9375. }
  9376. /**
  9377. * Register a new "after" filter with the router.
  9378. *
  9379. * @param string|callable $callback
  9380. * @return void
  9381. * @static
  9382. */
  9383. public static function after($callback){
  9384. \Illuminate\Routing\Router::after($callback);
  9385. }
  9386. /**
  9387. * Register a new filter with the router.
  9388. *
  9389. * @param string $name
  9390. * @param string|callable $callback
  9391. * @return void
  9392. * @static
  9393. */
  9394. public static function filter($name, $callback){
  9395. \Illuminate\Routing\Router::filter($name, $callback);
  9396. }
  9397. /**
  9398. * Register a pattern-based filter with the router.
  9399. *
  9400. * @param string $pattern
  9401. * @param string $name
  9402. * @param array|null $methods
  9403. * @return void
  9404. * @static
  9405. */
  9406. public static function when($pattern, $name, $methods = null){
  9407. \Illuminate\Routing\Router::when($pattern, $name, $methods);
  9408. }
  9409. /**
  9410. * Register a regular expression based filter with the router.
  9411. *
  9412. * @param string $pattern
  9413. * @param string $name
  9414. * @param array|null $methods
  9415. * @return void
  9416. * @static
  9417. */
  9418. public static function whenRegex($pattern, $name, $methods = null){
  9419. \Illuminate\Routing\Router::whenRegex($pattern, $name, $methods);
  9420. }
  9421. /**
  9422. * Register a model binder for a wildcard.
  9423. *
  9424. * @param string $key
  9425. * @param string $class
  9426. * @param \Closure $callback
  9427. * @return void
  9428. * @throws NotFoundHttpException
  9429. * @static
  9430. */
  9431. public static function model($key, $class, $callback = null){
  9432. \Illuminate\Routing\Router::model($key, $class, $callback);
  9433. }
  9434. /**
  9435. * Add a new route parameter binder.
  9436. *
  9437. * @param string $key
  9438. * @param string|callable $binder
  9439. * @return void
  9440. * @static
  9441. */
  9442. public static function bind($key, $binder){
  9443. \Illuminate\Routing\Router::bind($key, $binder);
  9444. }
  9445. /**
  9446. * Create a class based binding using the IoC container.
  9447. *
  9448. * @param string $binding
  9449. * @return \Closure
  9450. * @static
  9451. */
  9452. public static function createClassBinding($binding){
  9453. return \Illuminate\Routing\Router::createClassBinding($binding);
  9454. }
  9455. /**
  9456. * Set a global where pattern on all routes
  9457. *
  9458. * @param string $key
  9459. * @param string $pattern
  9460. * @return void
  9461. * @static
  9462. */
  9463. public static function pattern($key, $pattern){
  9464. \Illuminate\Routing\Router::pattern($key, $pattern);
  9465. }
  9466. /**
  9467. * Set a group of global where patterns on all routes
  9468. *
  9469. * @param array $patterns
  9470. * @return void
  9471. * @static
  9472. */
  9473. public static function patterns($patterns){
  9474. \Illuminate\Routing\Router::patterns($patterns);
  9475. }
  9476. /**
  9477. * Call the given route's before filters.
  9478. *
  9479. * @param \Illuminate\Routing\Route $route
  9480. * @param \Illuminate\Http\Request $request
  9481. * @return mixed
  9482. * @static
  9483. */
  9484. public static function callRouteBefore($route, $request){
  9485. return \Illuminate\Routing\Router::callRouteBefore($route, $request);
  9486. }
  9487. /**
  9488. * Find the patterned filters matching a request.
  9489. *
  9490. * @param \Illuminate\Http\Request $request
  9491. * @return array
  9492. * @static
  9493. */
  9494. public static function findPatternFilters($request){
  9495. return \Illuminate\Routing\Router::findPatternFilters($request);
  9496. }
  9497. /**
  9498. * Call the given route's before filters.
  9499. *
  9500. * @param \Illuminate\Routing\Route $route
  9501. * @param \Illuminate\Http\Request $request
  9502. * @param \Illuminate\Http\Response $response
  9503. * @return mixed
  9504. * @static
  9505. */
  9506. public static function callRouteAfter($route, $request, $response){
  9507. return \Illuminate\Routing\Router::callRouteAfter($route, $request, $response);
  9508. }
  9509. /**
  9510. * Call the given route filter.
  9511. *
  9512. * @param string $filter
  9513. * @param array $parameters
  9514. * @param \Illuminate\Routing\Route $route
  9515. * @param \Illuminate\Http\Request $request
  9516. * @param \Illuminate\Http\Response|null $response
  9517. * @return mixed
  9518. * @static
  9519. */
  9520. public static function callRouteFilter($filter, $parameters, $route, $request, $response = null){
  9521. return \Illuminate\Routing\Router::callRouteFilter($filter, $parameters, $route, $request, $response);
  9522. }
  9523. /**
  9524. * Run a callback with filters disable on the router.
  9525. *
  9526. * @param callable $callback
  9527. * @return void
  9528. * @static
  9529. */
  9530. public static function withoutFilters($callback){
  9531. \Illuminate\Routing\Router::withoutFilters($callback);
  9532. }
  9533. /**
  9534. * Enable route filtering on the router.
  9535. *
  9536. * @return void
  9537. * @static
  9538. */
  9539. public static function enableFilters(){
  9540. \Illuminate\Routing\Router::enableFilters();
  9541. }
  9542. /**
  9543. * Disable route filtering on the router.
  9544. *
  9545. * @return void
  9546. * @static
  9547. */
  9548. public static function disableFilters(){
  9549. \Illuminate\Routing\Router::disableFilters();
  9550. }
  9551. /**
  9552. * Get a route parameter for the current route.
  9553. *
  9554. * @param string $key
  9555. * @param string $default
  9556. * @return mixed
  9557. * @static
  9558. */
  9559. public static function input($key, $default = null){
  9560. return \Illuminate\Routing\Router::input($key, $default);
  9561. }
  9562. /**
  9563. * Get the currently dispatched route instance.
  9564. *
  9565. * @return \Illuminate\Routing\Route
  9566. * @static
  9567. */
  9568. public static function getCurrentRoute(){
  9569. return \Illuminate\Routing\Router::getCurrentRoute();
  9570. }
  9571. /**
  9572. * Get the currently dispatched route instance.
  9573. *
  9574. * @return \Illuminate\Routing\Route
  9575. * @static
  9576. */
  9577. public static function current(){
  9578. return \Illuminate\Routing\Router::current();
  9579. }
  9580. /**
  9581. * Check if a route with the given name exists.
  9582. *
  9583. * @param string $name
  9584. * @return bool
  9585. * @static
  9586. */
  9587. public static function has($name){
  9588. return \Illuminate\Routing\Router::has($name);
  9589. }
  9590. /**
  9591. * Get the current route name.
  9592. *
  9593. * @return string|null
  9594. * @static
  9595. */
  9596. public static function currentRouteName(){
  9597. return \Illuminate\Routing\Router::currentRouteName();
  9598. }
  9599. /**
  9600. * Alias for the "currentRouteNamed" method.
  9601. *
  9602. * @param mixed string
  9603. * @return bool
  9604. * @static
  9605. */
  9606. public static function is(){
  9607. return \Illuminate\Routing\Router::is();
  9608. }
  9609. /**
  9610. * Determine if the current route matches a given name.
  9611. *
  9612. * @param string $name
  9613. * @return bool
  9614. * @static
  9615. */
  9616. public static function currentRouteNamed($name){
  9617. return \Illuminate\Routing\Router::currentRouteNamed($name);
  9618. }
  9619. /**
  9620. * Get the current route action.
  9621. *
  9622. * @return string|null
  9623. * @static
  9624. */
  9625. public static function currentRouteAction(){
  9626. return \Illuminate\Routing\Router::currentRouteAction();
  9627. }
  9628. /**
  9629. * Alias for the "currentRouteUses" method.
  9630. *
  9631. * @param mixed string
  9632. * @return bool
  9633. * @static
  9634. */
  9635. public static function uses(){
  9636. return \Illuminate\Routing\Router::uses();
  9637. }
  9638. /**
  9639. * Determine if the current route action matches a given action.
  9640. *
  9641. * @param string $action
  9642. * @return bool
  9643. * @static
  9644. */
  9645. public static function currentRouteUses($action){
  9646. return \Illuminate\Routing\Router::currentRouteUses($action);
  9647. }
  9648. /**
  9649. * Get the request currently being dispatched.
  9650. *
  9651. * @return \Illuminate\Http\Request
  9652. * @static
  9653. */
  9654. public static function getCurrentRequest(){
  9655. return \Illuminate\Routing\Router::getCurrentRequest();
  9656. }
  9657. /**
  9658. * Get the underlying route collection.
  9659. *
  9660. * @return \Illuminate\Routing\RouteCollection
  9661. * @static
  9662. */
  9663. public static function getRoutes(){
  9664. return \Illuminate\Routing\Router::getRoutes();
  9665. }
  9666. /**
  9667. * Get the controller dispatcher instance.
  9668. *
  9669. * @return \Illuminate\Routing\ControllerDispatcher
  9670. * @static
  9671. */
  9672. public static function getControllerDispatcher(){
  9673. return \Illuminate\Routing\Router::getControllerDispatcher();
  9674. }
  9675. /**
  9676. * Set the controller dispatcher instance.
  9677. *
  9678. * @param \Illuminate\Routing\ControllerDispatcher $dispatcher
  9679. * @return void
  9680. * @static
  9681. */
  9682. public static function setControllerDispatcher($dispatcher){
  9683. \Illuminate\Routing\Router::setControllerDispatcher($dispatcher);
  9684. }
  9685. /**
  9686. * Get a controller inspector instance.
  9687. *
  9688. * @return \Illuminate\Routing\ControllerInspector
  9689. * @static
  9690. */
  9691. public static function getInspector(){
  9692. return \Illuminate\Routing\Router::getInspector();
  9693. }
  9694. /**
  9695. * Get the global "where" patterns.
  9696. *
  9697. * @return array
  9698. * @static
  9699. */
  9700. public static function getPatterns(){
  9701. return \Illuminate\Routing\Router::getPatterns();
  9702. }
  9703. /**
  9704. * Get the response for a given request.
  9705. *
  9706. * @param \Symfony\Component\HttpFoundation\Request $request
  9707. * @param int $type
  9708. * @param bool $catch
  9709. * @return \Illuminate\Http\Response
  9710. * @static
  9711. */
  9712. public static function handle($request, $type = 1, $catch = true){
  9713. return \Illuminate\Routing\Router::handle($request, $type, $catch);
  9714. }
  9715. }
  9716. class Schema extends \Illuminate\Support\Facades\Schema{
  9717. /**
  9718. * Determine if the given table exists.
  9719. *
  9720. * @param string $table
  9721. * @return bool
  9722. * @static
  9723. */
  9724. public static function hasTable($table){
  9725. return \Illuminate\Database\Schema\MySqlBuilder::hasTable($table);
  9726. }
  9727. /**
  9728. * Get the column listing for a given table.
  9729. *
  9730. * @param string $table
  9731. * @return array
  9732. * @static
  9733. */
  9734. public static function getColumnListing($table){
  9735. return \Illuminate\Database\Schema\MySqlBuilder::getColumnListing($table);
  9736. }
  9737. /**
  9738. * Determine if the given table has a given column.
  9739. *
  9740. * @param string $table
  9741. * @param string $column
  9742. * @return bool
  9743. * @static
  9744. */
  9745. public static function hasColumn($table, $column){
  9746. //Method inherited from \Illuminate\Database\Schema\Builder
  9747. return \Illuminate\Database\Schema\MySqlBuilder::hasColumn($table, $column);
  9748. }
  9749. /**
  9750. * Modify a table on the schema.
  9751. *
  9752. * @param string $table
  9753. * @param \Closure $callback
  9754. * @return \Illuminate\Database\Schema\Blueprint
  9755. * @static
  9756. */
  9757. public static function table($table, $callback){
  9758. //Method inherited from \Illuminate\Database\Schema\Builder
  9759. return \Illuminate\Database\Schema\MySqlBuilder::table($table, $callback);
  9760. }
  9761. /**
  9762. * Create a new table on the schema.
  9763. *
  9764. * @param string $table
  9765. * @param \Closure $callback
  9766. * @return \Illuminate\Database\Schema\Blueprint
  9767. * @static
  9768. */
  9769. public static function create($table, $callback){
  9770. //Method inherited from \Illuminate\Database\Schema\Builder
  9771. return \Illuminate\Database\Schema\MySqlBuilder::create($table, $callback);
  9772. }
  9773. /**
  9774. * Drop a table from the schema.
  9775. *
  9776. * @param string $table
  9777. * @return \Illuminate\Database\Schema\Blueprint
  9778. * @static
  9779. */
  9780. public static function drop($table){
  9781. //Method inherited from \Illuminate\Database\Schema\Builder
  9782. return \Illuminate\Database\Schema\MySqlBuilder::drop($table);
  9783. }
  9784. /**
  9785. * Drop a table from the schema if it exists.
  9786. *
  9787. * @param string $table
  9788. * @return \Illuminate\Database\Schema\Blueprint
  9789. * @static
  9790. */
  9791. public static function dropIfExists($table){
  9792. //Method inherited from \Illuminate\Database\Schema\Builder
  9793. return \Illuminate\Database\Schema\MySqlBuilder::dropIfExists($table);
  9794. }
  9795. /**
  9796. * Rename a table on the schema.
  9797. *
  9798. * @param string $from
  9799. * @param string $to
  9800. * @return \Illuminate\Database\Schema\Blueprint
  9801. * @static
  9802. */
  9803. public static function rename($from, $to){
  9804. //Method inherited from \Illuminate\Database\Schema\Builder
  9805. return \Illuminate\Database\Schema\MySqlBuilder::rename($from, $to);
  9806. }
  9807. /**
  9808. * Get the database connection instance.
  9809. *
  9810. * @return \Illuminate\Database\Connection
  9811. * @static
  9812. */
  9813. public static function getConnection(){
  9814. //Method inherited from \Illuminate\Database\Schema\Builder
  9815. return \Illuminate\Database\Schema\MySqlBuilder::getConnection();
  9816. }
  9817. /**
  9818. * Set the database connection instance.
  9819. *
  9820. * @param \Illuminate\Database\Connection
  9821. * @return $this
  9822. * @static
  9823. */
  9824. public static function setConnection($connection){
  9825. //Method inherited from \Illuminate\Database\Schema\Builder
  9826. return \Illuminate\Database\Schema\MySqlBuilder::setConnection($connection);
  9827. }
  9828. /**
  9829. * Set the Schema Blueprint resolver callback.
  9830. *
  9831. * @param \Closure $resolver
  9832. * @return void
  9833. * @static
  9834. */
  9835. public static function blueprintResolver($resolver){
  9836. //Method inherited from \Illuminate\Database\Schema\Builder
  9837. \Illuminate\Database\Schema\MySqlBuilder::blueprintResolver($resolver);
  9838. }
  9839. }
  9840. class Seeder extends \Illuminate\Database\Seeder{
  9841. }
  9842. class Session extends \Illuminate\Support\Facades\Session{
  9843. /**
  9844. * Get the session configuration.
  9845. *
  9846. * @return array
  9847. * @static
  9848. */
  9849. public static function getSessionConfig(){
  9850. return \Illuminate\Session\SessionManager::getSessionConfig();
  9851. }
  9852. /**
  9853. * Get the default session driver name.
  9854. *
  9855. * @return string
  9856. * @static
  9857. */
  9858. public static function getDefaultDriver(){
  9859. return \Illuminate\Session\SessionManager::getDefaultDriver();
  9860. }
  9861. /**
  9862. * Set the default session driver name.
  9863. *
  9864. * @param string $name
  9865. * @return void
  9866. * @static
  9867. */
  9868. public static function setDefaultDriver($name){
  9869. \Illuminate\Session\SessionManager::setDefaultDriver($name);
  9870. }
  9871. /**
  9872. * Get a driver instance.
  9873. *
  9874. * @param string $driver
  9875. * @return mixed
  9876. * @static
  9877. */
  9878. public static function driver($driver = null){
  9879. //Method inherited from \Illuminate\Support\Manager
  9880. return \Illuminate\Session\SessionManager::driver($driver);
  9881. }
  9882. /**
  9883. * Register a custom driver creator Closure.
  9884. *
  9885. * @param string $driver
  9886. * @param \Closure $callback
  9887. * @return $this
  9888. * @static
  9889. */
  9890. public static function extend($driver, $callback){
  9891. //Method inherited from \Illuminate\Support\Manager
  9892. return \Illuminate\Session\SessionManager::extend($driver, $callback);
  9893. }
  9894. /**
  9895. * Get all of the created "drivers".
  9896. *
  9897. * @return array
  9898. * @static
  9899. */
  9900. public static function getDrivers(){
  9901. //Method inherited from \Illuminate\Support\Manager
  9902. return \Illuminate\Session\SessionManager::getDrivers();
  9903. }
  9904. /**
  9905. * Starts the session storage.
  9906. *
  9907. * @return bool True if session started.
  9908. * @throws \RuntimeException If session fails to start.
  9909. * @api
  9910. * @static
  9911. */
  9912. public static function start(){
  9913. return \Illuminate\Session\Store::start();
  9914. }
  9915. /**
  9916. * Returns the session ID.
  9917. *
  9918. * @return string The session ID.
  9919. * @api
  9920. * @static
  9921. */
  9922. public static function getId(){
  9923. return \Illuminate\Session\Store::getId();
  9924. }
  9925. /**
  9926. * Sets the session ID.
  9927. *
  9928. * @param string $id
  9929. * @api
  9930. * @static
  9931. */
  9932. public static function setId($id){
  9933. return \Illuminate\Session\Store::setId($id);
  9934. }
  9935. /**
  9936. * Determine if this is a valid session ID.
  9937. *
  9938. * @param string $id
  9939. * @return bool
  9940. * @static
  9941. */
  9942. public static function isValidId($id){
  9943. return \Illuminate\Session\Store::isValidId($id);
  9944. }
  9945. /**
  9946. * Returns the session name.
  9947. *
  9948. * @return mixed The session name.
  9949. * @api
  9950. * @static
  9951. */
  9952. public static function getName(){
  9953. return \Illuminate\Session\Store::getName();
  9954. }
  9955. /**
  9956. * Sets the session name.
  9957. *
  9958. * @param string $name
  9959. * @api
  9960. * @static
  9961. */
  9962. public static function setName($name){
  9963. return \Illuminate\Session\Store::setName($name);
  9964. }
  9965. /**
  9966. * Invalidates the current session.
  9967. *
  9968. * Clears all session attributes and flashes and regenerates the
  9969. * session and deletes the old session from persistence.
  9970. *
  9971. * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
  9972. * will leave the system settings unchanged, 0 sets the cookie
  9973. * to expire with browser session. Time is in seconds, and is
  9974. * not a Unix timestamp.
  9975. * @return bool True if session invalidated, false if error.
  9976. * @api
  9977. * @static
  9978. */
  9979. public static function invalidate($lifetime = null){
  9980. return \Illuminate\Session\Store::invalidate($lifetime);
  9981. }
  9982. /**
  9983. * Migrates the current session to a new session id while maintaining all
  9984. * session attributes.
  9985. *
  9986. * @param bool $destroy Whether to delete the old session or leave it to garbage collection.
  9987. * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value
  9988. * will leave the system settings unchanged, 0 sets the cookie
  9989. * to expire with browser session. Time is in seconds, and is
  9990. * not a Unix timestamp.
  9991. * @return bool True if session migrated, false if error.
  9992. * @api
  9993. * @static
  9994. */
  9995. public static function migrate($destroy = false, $lifetime = null){
  9996. return \Illuminate\Session\Store::migrate($destroy, $lifetime);
  9997. }
  9998. /**
  9999. * Generate a new session identifier.
  10000. *
  10001. * @param bool $destroy
  10002. * @return bool
  10003. * @static
  10004. */
  10005. public static function regenerate($destroy = false){
  10006. return \Illuminate\Session\Store::regenerate($destroy);
  10007. }
  10008. /**
  10009. * Force the session to be saved and closed.
  10010. *
  10011. * This method is generally not required for real sessions as
  10012. * the session will be automatically saved at the end of
  10013. * code execution.
  10014. *
  10015. * @static
  10016. */
  10017. public static function save(){
  10018. return \Illuminate\Session\Store::save();
  10019. }
  10020. /**
  10021. * Age the flash data for the session.
  10022. *
  10023. * @return void
  10024. * @static
  10025. */
  10026. public static function ageFlashData(){
  10027. \Illuminate\Session\Store::ageFlashData();
  10028. }
  10029. /**
  10030. * Checks if an attribute is defined.
  10031. *
  10032. * @param string $name The attribute name
  10033. * @return bool true if the attribute is defined, false otherwise
  10034. * @api
  10035. * @static
  10036. */
  10037. public static function has($name){
  10038. return \Illuminate\Session\Store::has($name);
  10039. }
  10040. /**
  10041. * Returns an attribute.
  10042. *
  10043. * @param string $name The attribute name
  10044. * @param mixed $default The default value if not found.
  10045. * @return mixed
  10046. * @api
  10047. * @static
  10048. */
  10049. public static function get($name, $default = null){
  10050. return \Illuminate\Session\Store::get($name, $default);
  10051. }
  10052. /**
  10053. * Get the value of a given key and then forget it.
  10054. *
  10055. * @param string $key
  10056. * @param string $default
  10057. * @return mixed
  10058. * @static
  10059. */
  10060. public static function pull($key, $default = null){
  10061. return \Illuminate\Session\Store::pull($key, $default);
  10062. }
  10063. /**
  10064. * Determine if the session contains old input.
  10065. *
  10066. * @param string $key
  10067. * @return bool
  10068. * @static
  10069. */
  10070. public static function hasOldInput($key = null){
  10071. return \Illuminate\Session\Store::hasOldInput($key);
  10072. }
  10073. /**
  10074. * Get the requested item from the flashed input array.
  10075. *
  10076. * @param string $key
  10077. * @param mixed $default
  10078. * @return mixed
  10079. * @static
  10080. */
  10081. public static function getOldInput($key = null, $default = null){
  10082. return \Illuminate\Session\Store::getOldInput($key, $default);
  10083. }
  10084. /**
  10085. * Sets an attribute.
  10086. *
  10087. * @param string $name
  10088. * @param mixed $value
  10089. * @api
  10090. * @static
  10091. */
  10092. public static function set($name, $value){
  10093. return \Illuminate\Session\Store::set($name, $value);
  10094. }
  10095. /**
  10096. * Put a key / value pair or array of key / value pairs in the session.
  10097. *
  10098. * @param string|array $key
  10099. * @param mixed|null $value
  10100. * @return void
  10101. * @static
  10102. */
  10103. public static function put($key, $value = null){
  10104. \Illuminate\Session\Store::put($key, $value);
  10105. }
  10106. /**
  10107. * Push a value onto a session array.
  10108. *
  10109. * @param string $key
  10110. * @param mixed $value
  10111. * @return void
  10112. * @static
  10113. */
  10114. public static function push($key, $value){
  10115. \Illuminate\Session\Store::push($key, $value);
  10116. }
  10117. /**
  10118. * Flash a key / value pair to the session.
  10119. *
  10120. * @param string $key
  10121. * @param mixed $value
  10122. * @return void
  10123. * @static
  10124. */
  10125. public static function flash($key, $value){
  10126. \Illuminate\Session\Store::flash($key, $value);
  10127. }
  10128. /**
  10129. * Flash an input array to the session.
  10130. *
  10131. * @param array $value
  10132. * @return void
  10133. * @static
  10134. */
  10135. public static function flashInput($value){
  10136. \Illuminate\Session\Store::flashInput($value);
  10137. }
  10138. /**
  10139. * Reflash all of the session flash data.
  10140. *
  10141. * @return void
  10142. * @static
  10143. */
  10144. public static function reflash(){
  10145. \Illuminate\Session\Store::reflash();
  10146. }
  10147. /**
  10148. * Reflash a subset of the current flash data.
  10149. *
  10150. * @param array|mixed $keys
  10151. * @return void
  10152. * @static
  10153. */
  10154. public static function keep($keys = null){
  10155. \Illuminate\Session\Store::keep($keys);
  10156. }
  10157. /**
  10158. * Returns attributes.
  10159. *
  10160. * @return array Attributes
  10161. * @api
  10162. * @static
  10163. */
  10164. public static function all(){
  10165. return \Illuminate\Session\Store::all();
  10166. }
  10167. /**
  10168. * Sets attributes.
  10169. *
  10170. * @param array $attributes Attributes
  10171. * @static
  10172. */
  10173. public static function replace($attributes){
  10174. return \Illuminate\Session\Store::replace($attributes);
  10175. }
  10176. /**
  10177. * Removes an attribute.
  10178. *
  10179. * @param string $name
  10180. * @return mixed The removed value or null when it does not exist
  10181. * @api
  10182. * @static
  10183. */
  10184. public static function remove($name){
  10185. return \Illuminate\Session\Store::remove($name);
  10186. }
  10187. /**
  10188. * Remove an item from the session.
  10189. *
  10190. * @param string $key
  10191. * @return void
  10192. * @static
  10193. */
  10194. public static function forget($key){
  10195. \Illuminate\Session\Store::forget($key);
  10196. }
  10197. /**
  10198. * Clears all attributes.
  10199. *
  10200. * @api
  10201. * @static
  10202. */
  10203. public static function clear(){
  10204. return \Illuminate\Session\Store::clear();
  10205. }
  10206. /**
  10207. * Remove all of the items from the session.
  10208. *
  10209. * @return void
  10210. * @static
  10211. */
  10212. public static function flush(){
  10213. \Illuminate\Session\Store::flush();
  10214. }
  10215. /**
  10216. * Checks if the session was started.
  10217. *
  10218. * @return bool
  10219. * @static
  10220. */
  10221. public static function isStarted(){
  10222. return \Illuminate\Session\Store::isStarted();
  10223. }
  10224. /**
  10225. * Registers a SessionBagInterface with the session.
  10226. *
  10227. * @param \Symfony\Component\HttpFoundation\Session\SessionBagInterface $bag
  10228. * @static
  10229. */
  10230. public static function registerBag($bag){
  10231. return \Illuminate\Session\Store::registerBag($bag);
  10232. }
  10233. /**
  10234. * Gets a bag instance by name.
  10235. *
  10236. * @param string $name
  10237. * @return \Symfony\Component\HttpFoundation\Session\SessionBagInterface
  10238. * @static
  10239. */
  10240. public static function getBag($name){
  10241. return \Illuminate\Session\Store::getBag($name);
  10242. }
  10243. /**
  10244. * Gets session meta.
  10245. *
  10246. * @return \Symfony\Component\HttpFoundation\Session\MetadataBag
  10247. * @static
  10248. */
  10249. public static function getMetadataBag(){
  10250. return \Illuminate\Session\Store::getMetadataBag();
  10251. }
  10252. /**
  10253. * Get the raw bag data array for a given bag.
  10254. *
  10255. * @param string $name
  10256. * @return array
  10257. * @static
  10258. */
  10259. public static function getBagData($name){
  10260. return \Illuminate\Session\Store::getBagData($name);
  10261. }
  10262. /**
  10263. * Get the CSRF token value.
  10264. *
  10265. * @return string
  10266. * @static
  10267. */
  10268. public static function token(){
  10269. return \Illuminate\Session\Store::token();
  10270. }
  10271. /**
  10272. * Get the CSRF token value.
  10273. *
  10274. * @return string
  10275. * @static
  10276. */
  10277. public static function getToken(){
  10278. return \Illuminate\Session\Store::getToken();
  10279. }
  10280. /**
  10281. * Regenerate the CSRF token value.
  10282. *
  10283. * @return void
  10284. * @static
  10285. */
  10286. public static function regenerateToken(){
  10287. \Illuminate\Session\Store::regenerateToken();
  10288. }
  10289. /**
  10290. * Set the existence of the session on the handler if applicable.
  10291. *
  10292. * @param bool $value
  10293. * @return void
  10294. * @static
  10295. */
  10296. public static function setExists($value){
  10297. \Illuminate\Session\Store::setExists($value);
  10298. }
  10299. /**
  10300. * Get the underlying session handler implementation.
  10301. *
  10302. * @return \SessionHandlerInterface
  10303. * @static
  10304. */
  10305. public static function getHandler(){
  10306. return \Illuminate\Session\Store::getHandler();
  10307. }
  10308. /**
  10309. * Determine if the session handler needs a request.
  10310. *
  10311. * @return bool
  10312. * @static
  10313. */
  10314. public static function handlerNeedsRequest(){
  10315. return \Illuminate\Session\Store::handlerNeedsRequest();
  10316. }
  10317. /**
  10318. * Set the request on the handler instance.
  10319. *
  10320. * @param \Symfony\Component\HttpFoundation\Request $request
  10321. * @return void
  10322. * @static
  10323. */
  10324. public static function setRequestOnHandler($request){
  10325. \Illuminate\Session\Store::setRequestOnHandler($request);
  10326. }
  10327. }
  10328. class SSH extends \Illuminate\Support\Facades\SSH{
  10329. /**
  10330. * Get a remote connection instance.
  10331. *
  10332. * @param string|array|mixed $name
  10333. * @return \Illuminate\Remote\Connection
  10334. * @static
  10335. */
  10336. public static function into($name){
  10337. return \Illuminate\Remote\RemoteManager::into($name);
  10338. }
  10339. /**
  10340. * Get a remote connection instance.
  10341. *
  10342. * @param string|array $name
  10343. * @return \Illuminate\Remote\Connection
  10344. * @static
  10345. */
  10346. public static function connection($name = null){
  10347. return \Illuminate\Remote\RemoteManager::connection($name);
  10348. }
  10349. /**
  10350. * Get a connection group instance by name.
  10351. *
  10352. * @param string $name
  10353. * @return \Illuminate\Remote\Connection
  10354. * @static
  10355. */
  10356. public static function group($name){
  10357. return \Illuminate\Remote\RemoteManager::group($name);
  10358. }
  10359. /**
  10360. * Resolve a multiple connection instance.
  10361. *
  10362. * @param array $names
  10363. * @return \Illuminate\Remote\MultiConnection
  10364. * @static
  10365. */
  10366. public static function multiple($names){
  10367. return \Illuminate\Remote\RemoteManager::multiple($names);
  10368. }
  10369. /**
  10370. * Resolve a remote connection instance.
  10371. *
  10372. * @param string $name
  10373. * @return \Illuminate\Remote\Connection
  10374. * @static
  10375. */
  10376. public static function resolve($name){
  10377. return \Illuminate\Remote\RemoteManager::resolve($name);
  10378. }
  10379. /**
  10380. * Get the default connection name.
  10381. *
  10382. * @return string
  10383. * @static
  10384. */
  10385. public static function getDefaultConnection(){
  10386. return \Illuminate\Remote\RemoteManager::getDefaultConnection();
  10387. }
  10388. /**
  10389. * Set the default connection name.
  10390. *
  10391. * @param string $name
  10392. * @return void
  10393. * @static
  10394. */
  10395. public static function setDefaultConnection($name){
  10396. \Illuminate\Remote\RemoteManager::setDefaultConnection($name);
  10397. }
  10398. /**
  10399. * Define a set of commands as a task.
  10400. *
  10401. * @param string $task
  10402. * @param string|array $commands
  10403. * @return void
  10404. * @static
  10405. */
  10406. public static function define($task, $commands){
  10407. \Illuminate\Remote\Connection::define($task, $commands);
  10408. }
  10409. /**
  10410. * Run a task against the connection.
  10411. *
  10412. * @param string $task
  10413. * @param \Closure $callback
  10414. * @return void
  10415. * @static
  10416. */
  10417. public static function task($task, $callback = null){
  10418. \Illuminate\Remote\Connection::task($task, $callback);
  10419. }
  10420. /**
  10421. * Run a set of commands against the connection.
  10422. *
  10423. * @param string|array $commands
  10424. * @param \Closure $callback
  10425. * @return void
  10426. * @static
  10427. */
  10428. public static function run($commands, $callback = null){
  10429. \Illuminate\Remote\Connection::run($commands, $callback);
  10430. }
  10431. /**
  10432. * Download the contents of a remote file.
  10433. *
  10434. * @param string $remote
  10435. * @param string $local
  10436. * @return void
  10437. * @static
  10438. */
  10439. public static function get($remote, $local){
  10440. \Illuminate\Remote\Connection::get($remote, $local);
  10441. }
  10442. /**
  10443. * Get the contents of a remote file.
  10444. *
  10445. * @param string $remote
  10446. * @return string
  10447. * @static
  10448. */
  10449. public static function getString($remote){
  10450. return \Illuminate\Remote\Connection::getString($remote);
  10451. }
  10452. /**
  10453. * Upload a local file to the server.
  10454. *
  10455. * @param string $local
  10456. * @param string $remote
  10457. * @return void
  10458. * @static
  10459. */
  10460. public static function put($local, $remote){
  10461. \Illuminate\Remote\Connection::put($local, $remote);
  10462. }
  10463. /**
  10464. * Upload a string to to the given file on the server.
  10465. *
  10466. * @param string $remote
  10467. * @param string $contents
  10468. * @return void
  10469. * @static
  10470. */
  10471. public static function putString($remote, $contents){
  10472. \Illuminate\Remote\Connection::putString($remote, $contents);
  10473. }
  10474. /**
  10475. * Display the given line using the default output.
  10476. *
  10477. * @param string $line
  10478. * @return void
  10479. * @static
  10480. */
  10481. public static function display($line){
  10482. \Illuminate\Remote\Connection::display($line);
  10483. }
  10484. /**
  10485. * Get the exit status of the last command.
  10486. *
  10487. * @return int|bool
  10488. * @static
  10489. */
  10490. public static function status(){
  10491. return \Illuminate\Remote\Connection::status();
  10492. }
  10493. /**
  10494. * Get the gateway implementation.
  10495. *
  10496. * @return \Illuminate\Remote\GatewayInterface
  10497. * @throws \RuntimeException
  10498. * @static
  10499. */
  10500. public static function getGateway(){
  10501. return \Illuminate\Remote\Connection::getGateway();
  10502. }
  10503. /**
  10504. * Get the output implementation for the connection.
  10505. *
  10506. * @return \Symfony\Component\Console\Output\OutputInterface
  10507. * @static
  10508. */
  10509. public static function getOutput(){
  10510. return \Illuminate\Remote\Connection::getOutput();
  10511. }
  10512. /**
  10513. * Set the output implementation.
  10514. *
  10515. * @param \Symfony\Component\Console\Output\OutputInterface $output
  10516. * @return void
  10517. * @static
  10518. */
  10519. public static function setOutput($output){
  10520. \Illuminate\Remote\Connection::setOutput($output);
  10521. }
  10522. }
  10523. class Str extends \Illuminate\Support\Str{
  10524. }
  10525. class URL extends \Illuminate\Support\Facades\URL{
  10526. /**
  10527. * Get the full URL for the current request.
  10528. *
  10529. * @return string
  10530. * @static
  10531. */
  10532. public static function full(){
  10533. return \Illuminate\Routing\UrlGenerator::full();
  10534. }
  10535. /**
  10536. * Get the current URL for the request.
  10537. *
  10538. * @return string
  10539. * @static
  10540. */
  10541. public static function current(){
  10542. return \Illuminate\Routing\UrlGenerator::current();
  10543. }
  10544. /**
  10545. * Get the URL for the previous request.
  10546. *
  10547. * @return string
  10548. * @static
  10549. */
  10550. public static function previous(){
  10551. return \Illuminate\Routing\UrlGenerator::previous();
  10552. }
  10553. /**
  10554. * Generate a absolute URL to the given path.
  10555. *
  10556. * @param string $path
  10557. * @param mixed $extra
  10558. * @param bool|null $secure
  10559. * @return string
  10560. * @static
  10561. */
  10562. public static function to($path, $extra = array(), $secure = null){
  10563. return \Illuminate\Routing\UrlGenerator::to($path, $extra, $secure);
  10564. }
  10565. /**
  10566. * Generate a secure, absolute URL to the given path.
  10567. *
  10568. * @param string $path
  10569. * @param array $parameters
  10570. * @return string
  10571. * @static
  10572. */
  10573. public static function secure($path, $parameters = array()){
  10574. return \Illuminate\Routing\UrlGenerator::secure($path, $parameters);
  10575. }
  10576. /**
  10577. * Generate a URL to an application asset.
  10578. *
  10579. * @param string $path
  10580. * @param bool|null $secure
  10581. * @return string
  10582. * @static
  10583. */
  10584. public static function asset($path, $secure = null){
  10585. return \Illuminate\Routing\UrlGenerator::asset($path, $secure);
  10586. }
  10587. /**
  10588. * Generate a URL to a secure asset.
  10589. *
  10590. * @param string $path
  10591. * @return string
  10592. * @static
  10593. */
  10594. public static function secureAsset($path){
  10595. return \Illuminate\Routing\UrlGenerator::secureAsset($path);
  10596. }
  10597. /**
  10598. * Force the schema for URLs.
  10599. *
  10600. * @param string $schema
  10601. * @return void
  10602. * @static
  10603. */
  10604. public static function forceSchema($schema){
  10605. \Illuminate\Routing\UrlGenerator::forceSchema($schema);
  10606. }
  10607. /**
  10608. * Get the URL to a named route.
  10609. *
  10610. * @param string $name
  10611. * @param mixed $parameters
  10612. * @param bool $absolute
  10613. * @param \Illuminate\Routing\Route $route
  10614. * @return string
  10615. * @throws \InvalidArgumentException
  10616. * @static
  10617. */
  10618. public static function route($name, $parameters = array(), $absolute = true, $route = null){
  10619. return \Illuminate\Routing\UrlGenerator::route($name, $parameters, $absolute, $route);
  10620. }
  10621. /**
  10622. * Get the URL to a controller action.
  10623. *
  10624. * @param string $action
  10625. * @param mixed $parameters
  10626. * @param bool $absolute
  10627. * @return string
  10628. * @static
  10629. */
  10630. public static function action($action, $parameters = array(), $absolute = true){
  10631. return \Illuminate\Routing\UrlGenerator::action($action, $parameters, $absolute);
  10632. }
  10633. /**
  10634. * Set the forced root URL.
  10635. *
  10636. * @param string $root
  10637. * @return void
  10638. * @static
  10639. */
  10640. public static function forceRootUrl($root){
  10641. \Illuminate\Routing\UrlGenerator::forceRootUrl($root);
  10642. }
  10643. /**
  10644. * Determine if the given path is a valid URL.
  10645. *
  10646. * @param string $path
  10647. * @return bool
  10648. * @static
  10649. */
  10650. public static function isValidUrl($path){
  10651. return \Illuminate\Routing\UrlGenerator::isValidUrl($path);
  10652. }
  10653. /**
  10654. * Get the request instance.
  10655. *
  10656. * @return \Symfony\Component\HttpFoundation\Request
  10657. * @static
  10658. */
  10659. public static function getRequest(){
  10660. return \Illuminate\Routing\UrlGenerator::getRequest();
  10661. }
  10662. /**
  10663. * Set the current request instance.
  10664. *
  10665. * @param \Illuminate\Http\Request $request
  10666. * @return void
  10667. * @static
  10668. */
  10669. public static function setRequest($request){
  10670. \Illuminate\Routing\UrlGenerator::setRequest($request);
  10671. }
  10672. }
  10673. class Validator extends \Illuminate\Support\Facades\Validator{
  10674. /**
  10675. * Create a new Validator instance.
  10676. *
  10677. * @param array $data
  10678. * @param array $rules
  10679. * @param array $messages
  10680. * @param array $customAttributes
  10681. * @return \Illuminate\Validation\Validator
  10682. * @static
  10683. */
  10684. public static function make($data, $rules, $messages = array(), $customAttributes = array()){
  10685. return \Illuminate\Validation\Factory::make($data, $rules, $messages, $customAttributes);
  10686. }
  10687. /**
  10688. * Register a custom validator extension.
  10689. *
  10690. * @param string $rule
  10691. * @param \Closure|string $extension
  10692. * @param string $message
  10693. * @return void
  10694. * @static
  10695. */
  10696. public static function extend($rule, $extension, $message = null){
  10697. \Illuminate\Validation\Factory::extend($rule, $extension, $message);
  10698. }
  10699. /**
  10700. * Register a custom implicit validator extension.
  10701. *
  10702. * @param string $rule
  10703. * @param \Closure|string $extension
  10704. * @param string $message
  10705. * @return void
  10706. * @static
  10707. */
  10708. public static function extendImplicit($rule, $extension, $message = null){
  10709. \Illuminate\Validation\Factory::extendImplicit($rule, $extension, $message);
  10710. }
  10711. /**
  10712. * Register a custom implicit validator message replacer.
  10713. *
  10714. * @param string $rule
  10715. * @param \Closure|string $replacer
  10716. * @return void
  10717. * @static
  10718. */
  10719. public static function replacer($rule, $replacer){
  10720. \Illuminate\Validation\Factory::replacer($rule, $replacer);
  10721. }
  10722. /**
  10723. * Set the Validator instance resolver.
  10724. *
  10725. * @param \Closure $resolver
  10726. * @return void
  10727. * @static
  10728. */
  10729. public static function resolver($resolver){
  10730. \Illuminate\Validation\Factory::resolver($resolver);
  10731. }
  10732. /**
  10733. * Get the Translator implementation.
  10734. *
  10735. * @return \Symfony\Component\Translation\TranslatorInterface
  10736. * @static
  10737. */
  10738. public static function getTranslator(){
  10739. return \Illuminate\Validation\Factory::getTranslator();
  10740. }
  10741. /**
  10742. * Get the Presence Verifier implementation.
  10743. *
  10744. * @return \Illuminate\Validation\PresenceVerifierInterface
  10745. * @static
  10746. */
  10747. public static function getPresenceVerifier(){
  10748. return \Illuminate\Validation\Factory::getPresenceVerifier();
  10749. }
  10750. /**
  10751. * Set the Presence Verifier implementation.
  10752. *
  10753. * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier
  10754. * @return void
  10755. * @static
  10756. */
  10757. public static function setPresenceVerifier($presenceVerifier){
  10758. \Illuminate\Validation\Factory::setPresenceVerifier($presenceVerifier);
  10759. }
  10760. }
  10761. class View extends \Illuminate\Support\Facades\View{
  10762. /**
  10763. * Get the evaluated view contents for the given view.
  10764. *
  10765. * @param string $view
  10766. * @param array $data
  10767. * @param array $mergeData
  10768. * @return \Illuminate\View\View
  10769. * @static
  10770. */
  10771. public static function make($view, $data = array(), $mergeData = array()){
  10772. return \Illuminate\View\Factory::make($view, $data, $mergeData);
  10773. }
  10774. /**
  10775. * Get the evaluated view contents for a named view.
  10776. *
  10777. * @param string $view
  10778. * @param mixed $data
  10779. * @return \Illuminate\View\View
  10780. * @static
  10781. */
  10782. public static function of($view, $data = array()){
  10783. return \Illuminate\View\Factory::of($view, $data);
  10784. }
  10785. /**
  10786. * Register a named view.
  10787. *
  10788. * @param string $view
  10789. * @param string $name
  10790. * @return void
  10791. * @static
  10792. */
  10793. public static function name($view, $name){
  10794. \Illuminate\View\Factory::name($view, $name);
  10795. }
  10796. /**
  10797. * Add an alias for a view.
  10798. *
  10799. * @param string $view
  10800. * @param string $alias
  10801. * @return void
  10802. * @static
  10803. */
  10804. public static function alias($view, $alias){
  10805. \Illuminate\View\Factory::alias($view, $alias);
  10806. }
  10807. /**
  10808. * Determine if a given view exists.
  10809. *
  10810. * @param string $view
  10811. * @return bool
  10812. * @static
  10813. */
  10814. public static function exists($view){
  10815. return \Illuminate\View\Factory::exists($view);
  10816. }
  10817. /**
  10818. * Get the rendered contents of a partial from a loop.
  10819. *
  10820. * @param string $view
  10821. * @param array $data
  10822. * @param string $iterator
  10823. * @param string $empty
  10824. * @return string
  10825. * @static
  10826. */
  10827. public static function renderEach($view, $data, $iterator, $empty = 'raw|'){
  10828. return \Illuminate\View\Factory::renderEach($view, $data, $iterator, $empty);
  10829. }
  10830. /**
  10831. * Get the appropriate view engine for the given path.
  10832. *
  10833. * @param string $path
  10834. * @return \Illuminate\View\Engines\EngineInterface
  10835. * @throws \InvalidArgumentException
  10836. * @static
  10837. */
  10838. public static function getEngineFromPath($path){
  10839. return \Illuminate\View\Factory::getEngineFromPath($path);
  10840. }
  10841. /**
  10842. * Add a piece of shared data to the environment.
  10843. *
  10844. * @param string $key
  10845. * @param mixed $value
  10846. * @return void
  10847. * @static
  10848. */
  10849. public static function share($key, $value = null){
  10850. \Illuminate\View\Factory::share($key, $value);
  10851. }
  10852. /**
  10853. * Register a view creator event.
  10854. *
  10855. * @param array|string $views
  10856. * @param \Closure|string $callback
  10857. * @return array
  10858. * @static
  10859. */
  10860. public static function creator($views, $callback){
  10861. return \Illuminate\View\Factory::creator($views, $callback);
  10862. }
  10863. /**
  10864. * Register multiple view composers via an array.
  10865. *
  10866. * @param array $composers
  10867. * @return array
  10868. * @static
  10869. */
  10870. public static function composers($composers){
  10871. return \Illuminate\View\Factory::composers($composers);
  10872. }
  10873. /**
  10874. * Register a view composer event.
  10875. *
  10876. * @param array|string $views
  10877. * @param \Closure|string $callback
  10878. * @param int|null $priority
  10879. * @return array
  10880. * @static
  10881. */
  10882. public static function composer($views, $callback, $priority = null){
  10883. return \Illuminate\View\Factory::composer($views, $callback, $priority);
  10884. }
  10885. /**
  10886. * Call the composer for a given view.
  10887. *
  10888. * @param \Illuminate\View\View $view
  10889. * @return void
  10890. * @static
  10891. */
  10892. public static function callComposer($view){
  10893. \Illuminate\View\Factory::callComposer($view);
  10894. }
  10895. /**
  10896. * Call the creator for a given view.
  10897. *
  10898. * @param \Illuminate\View\View $view
  10899. * @return void
  10900. * @static
  10901. */
  10902. public static function callCreator($view){
  10903. \Illuminate\View\Factory::callCreator($view);
  10904. }
  10905. /**
  10906. * Start injecting content into a section.
  10907. *
  10908. * @param string $section
  10909. * @param string $content
  10910. * @return void
  10911. * @static
  10912. */
  10913. public static function startSection($section, $content = ''){
  10914. \Illuminate\View\Factory::startSection($section, $content);
  10915. }
  10916. /**
  10917. * Inject inline content into a section.
  10918. *
  10919. * @param string $section
  10920. * @param string $content
  10921. * @return void
  10922. * @static
  10923. */
  10924. public static function inject($section, $content){
  10925. \Illuminate\View\Factory::inject($section, $content);
  10926. }
  10927. /**
  10928. * Stop injecting content into a section and return its contents.
  10929. *
  10930. * @return string
  10931. * @static
  10932. */
  10933. public static function yieldSection(){
  10934. return \Illuminate\View\Factory::yieldSection();
  10935. }
  10936. /**
  10937. * Stop injecting content into a section.
  10938. *
  10939. * @param bool $overwrite
  10940. * @return string
  10941. * @static
  10942. */
  10943. public static function stopSection($overwrite = false){
  10944. return \Illuminate\View\Factory::stopSection($overwrite);
  10945. }
  10946. /**
  10947. * Stop injecting content into a section and append it.
  10948. *
  10949. * @return string
  10950. * @static
  10951. */
  10952. public static function appendSection(){
  10953. return \Illuminate\View\Factory::appendSection();
  10954. }
  10955. /**
  10956. * Get the string contents of a section.
  10957. *
  10958. * @param string $section
  10959. * @param string $default
  10960. * @return string
  10961. * @static
  10962. */
  10963. public static function yieldContent($section, $default = ''){
  10964. return \Illuminate\View\Factory::yieldContent($section, $default);
  10965. }
  10966. /**
  10967. * Flush all of the section contents.
  10968. *
  10969. * @return void
  10970. * @static
  10971. */
  10972. public static function flushSections(){
  10973. \Illuminate\View\Factory::flushSections();
  10974. }
  10975. /**
  10976. * Flush all of the section contents if done rendering.
  10977. *
  10978. * @return void
  10979. * @static
  10980. */
  10981. public static function flushSectionsIfDoneRendering(){
  10982. \Illuminate\View\Factory::flushSectionsIfDoneRendering();
  10983. }
  10984. /**
  10985. * Increment the rendering counter.
  10986. *
  10987. * @return void
  10988. * @static
  10989. */
  10990. public static function incrementRender(){
  10991. \Illuminate\View\Factory::incrementRender();
  10992. }
  10993. /**
  10994. * Decrement the rendering counter.
  10995. *
  10996. * @return void
  10997. * @static
  10998. */
  10999. public static function decrementRender(){
  11000. \Illuminate\View\Factory::decrementRender();
  11001. }
  11002. /**
  11003. * Check if there are no active render operations.
  11004. *
  11005. * @return bool
  11006. * @static
  11007. */
  11008. public static function doneRendering(){
  11009. return \Illuminate\View\Factory::doneRendering();
  11010. }
  11011. /**
  11012. * Add a location to the array of view locations.
  11013. *
  11014. * @param string $location
  11015. * @return void
  11016. * @static
  11017. */
  11018. public static function addLocation($location){
  11019. \Illuminate\View\Factory::addLocation($location);
  11020. }
  11021. /**
  11022. * Add a new namespace to the loader.
  11023. *
  11024. * @param string $namespace
  11025. * @param string|array $hints
  11026. * @return void
  11027. * @static
  11028. */
  11029. public static function addNamespace($namespace, $hints){
  11030. \Illuminate\View\Factory::addNamespace($namespace, $hints);
  11031. }
  11032. /**
  11033. * Prepend a new namespace to the loader.
  11034. *
  11035. * @param string $namespace
  11036. * @param string|array $hints
  11037. * @return void
  11038. * @static
  11039. */
  11040. public static function prependNamespace($namespace, $hints){
  11041. \Illuminate\View\Factory::prependNamespace($namespace, $hints);
  11042. }
  11043. /**
  11044. * Register a valid view extension and its engine.
  11045. *
  11046. * @param string $extension
  11047. * @param string $engine
  11048. * @param \Closure $resolver
  11049. * @return void
  11050. * @static
  11051. */
  11052. public static function addExtension($extension, $engine, $resolver = null){
  11053. \Illuminate\View\Factory::addExtension($extension, $engine, $resolver);
  11054. }
  11055. /**
  11056. * Get the extension to engine bindings.
  11057. *
  11058. * @return array
  11059. * @static
  11060. */
  11061. public static function getExtensions(){
  11062. return \Illuminate\View\Factory::getExtensions();
  11063. }
  11064. /**
  11065. * Get the engine resolver instance.
  11066. *
  11067. * @return \Illuminate\View\Engines\EngineResolver
  11068. * @static
  11069. */
  11070. public static function getEngineResolver(){
  11071. return \Illuminate\View\Factory::getEngineResolver();
  11072. }
  11073. /**
  11074. * Get the view finder instance.
  11075. *
  11076. * @return \Illuminate\View\ViewFinderInterface
  11077. * @static
  11078. */
  11079. public static function getFinder(){
  11080. return \Illuminate\View\Factory::getFinder();
  11081. }
  11082. /**
  11083. * Set the view finder instance.
  11084. *
  11085. * @param \Illuminate\View\ViewFinderInterface $finder
  11086. * @return void
  11087. * @static
  11088. */
  11089. public static function setFinder($finder){
  11090. \Illuminate\View\Factory::setFinder($finder);
  11091. }
  11092. /**
  11093. * Get the event dispatcher instance.
  11094. *
  11095. * @return \Illuminate\Events\Dispatcher
  11096. * @static
  11097. */
  11098. public static function getDispatcher(){
  11099. return \Illuminate\View\Factory::getDispatcher();
  11100. }
  11101. /**
  11102. * Set the event dispatcher instance.
  11103. *
  11104. * @param \Illuminate\Events\Dispatcher
  11105. * @return void
  11106. * @static
  11107. */
  11108. public static function setDispatcher($events){
  11109. \Illuminate\View\Factory::setDispatcher($events);
  11110. }
  11111. /**
  11112. * Get the IoC container instance.
  11113. *
  11114. * @return \Illuminate\Container\Container
  11115. * @static
  11116. */
  11117. public static function getContainer(){
  11118. return \Illuminate\View\Factory::getContainer();
  11119. }
  11120. /**
  11121. * Set the IoC container instance.
  11122. *
  11123. * @param \Illuminate\Container\Container $container
  11124. * @return void
  11125. * @static
  11126. */
  11127. public static function setContainer($container){
  11128. \Illuminate\View\Factory::setContainer($container);
  11129. }
  11130. /**
  11131. * Get an item from the shared data.
  11132. *
  11133. * @param string $key
  11134. * @param mixed $default
  11135. * @return mixed
  11136. * @static
  11137. */
  11138. public static function shared($key, $default = null){
  11139. return \Illuminate\View\Factory::shared($key, $default);
  11140. }
  11141. /**
  11142. * Get all of the shared data for the environment.
  11143. *
  11144. * @return array
  11145. * @static
  11146. */
  11147. public static function getShared(){
  11148. return \Illuminate\View\Factory::getShared();
  11149. }
  11150. /**
  11151. * Get the entire array of sections.
  11152. *
  11153. * @return array
  11154. * @static
  11155. */
  11156. public static function getSections(){
  11157. return \Illuminate\View\Factory::getSections();
  11158. }
  11159. /**
  11160. * Get all of the registered named views in environment.
  11161. *
  11162. * @return array
  11163. * @static
  11164. */
  11165. public static function getNames(){
  11166. return \Illuminate\View\Factory::getNames();
  11167. }
  11168. }
  11169. }