DB.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static \Doctrine\DBAL\Driver\PDOConnection getPdo()
  5. * @method static \Illuminate\Database\ConnectionInterface connection(string $name = null)
  6. * @method static \Illuminate\Database\Query\Builder table(string $table, string $as = null)
  7. * @method static \Illuminate\Database\Query\Expression raw($value)
  8. * @method static array getQueryLog()
  9. * @method static array prepareBindings(array $bindings)
  10. * @method static array pretend(\Closure $callback)
  11. * @method static array select(string $query, array $bindings = [], bool $useReadPdo = true)
  12. * @method static bool insert(string $query, array $bindings = [])
  13. * @method static bool logging()
  14. * @method static bool statement(string $query, array $bindings = [])
  15. * @method static bool unprepared(string $query)
  16. * @method static int affectingStatement(string $query, array $bindings = [])
  17. * @method static int delete(string $query, array $bindings = [])
  18. * @method static int transactionLevel()
  19. * @method static int update(string $query, array $bindings = [])
  20. * @method static mixed selectOne(string $query, array $bindings = [], bool $useReadPdo = true)
  21. * @method static mixed transaction(\Closure $callback, int $attempts = 1)
  22. * @method static string getDefaultConnection()
  23. * @method static void afterCommit(\Closure $callback)
  24. * @method static void beginTransaction()
  25. * @method static void commit()
  26. * @method static void enableQueryLog()
  27. * @method static void disableQueryLog()
  28. * @method static void flushQueryLog()
  29. * @method static \Illuminate\Database\Connection beforeExecuting(\Closure $callback)
  30. * @method static void listen(\Closure $callback)
  31. * @method static void rollBack(int $toLevel = null)
  32. * @method static void setDefaultConnection(string $name)
  33. *
  34. * @see \Illuminate\Database\DatabaseManager
  35. * @see \Illuminate\Database\Connection
  36. */
  37. class DB extends Facade
  38. {
  39. /**
  40. * Get the registered name of the component.
  41. *
  42. * @return string
  43. */
  44. protected static function getFacadeAccessor()
  45. {
  46. return 'db';
  47. }
  48. }