PageRenderTime 86ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/_ide_helper.php

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