Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

factory.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 7.72 KiB


 001  <?php
 002  /**
 003  *
 004  * This file is part of the phpBB Forum Software package.
 005  *
 006  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007  * @license GNU General Public License, version 2 (GPL-2.0)
 008  *
 009  * For full copyright and license information, please see
 010  * the docs/CREDITS.txt file.
 011  *
 012  */
 013   
 014  namespace phpbb\db\driver;
 015   
 016  use \Symfony\Component\DependencyInjection\ContainerInterface;
 017   
 018  /**
 019  * Database Abstraction Layer
 020  */
 021  class factory implements driver_interface
 022  {
 023      /**
 024      * @var driver_interface
 025      */
 026      protected $driver = null;
 027   
 028      /**
 029      * @var ContainerInterface
 030      */
 031      protected $container;
 032   
 033      /**
 034      * Constructor.
 035      *
 036      * @param ContainerInterface $container A ContainerInterface instance
 037      */
 038      public function __construct(ContainerInterface $container)
 039      {
 040          $this->container = $container;
 041      }
 042   
 043      /**
 044      * Return the current driver (and retrieved it from the container if necessary)
 045      *
 046      * @return driver_interface
 047      */
 048      protected function get_driver()
 049      {
 050          if ($this->driver === null)
 051          {
 052              $this->driver = $this->container->get('dbal.conn.driver');
 053          }
 054   
 055          return $this->driver;
 056      }
 057   
 058      /**
 059      * Set the current driver
 060      *
 061      * @param driver_interface $driver
 062      */
 063      public function set_driver(driver_interface $driver)
 064      {
 065          $this->driver = $driver;
 066      }
 067   
 068      /**
 069      * {@inheritdoc}
 070      */
 071      public function get_sql_layer()
 072      {
 073          return $this->get_driver()->get_sql_layer();
 074      }
 075   
 076      /**
 077      * {@inheritdoc}
 078      */
 079      public function get_db_name()
 080      {
 081          return $this->get_driver()->get_db_name();
 082      }
 083   
 084      /**
 085      * {@inheritdoc}
 086      */
 087      public function get_any_char()
 088      {
 089          return $this->get_driver()->get_any_char();
 090      }
 091   
 092      /**
 093      * {@inheritdoc}
 094      */
 095      public function get_one_char()
 096      {
 097          return $this->get_driver()->get_one_char();
 098      }
 099   
 100      /**
 101      * {@inheritdoc}
 102      */
 103      public function get_db_connect_id()
 104      {
 105          return $this->get_driver()->get_db_connect_id();
 106      }
 107   
 108      /**
 109      * {@inheritdoc}
 110      */
 111      public function get_sql_error_triggered()
 112      {
 113          return $this->get_driver()->get_sql_error_triggered();
 114      }
 115   
 116      /**
 117      * {@inheritdoc}
 118      */
 119      public function get_sql_error_sql()
 120      {
 121          return $this->get_driver()->get_sql_error_sql();
 122      }
 123   
 124      /**
 125      * {@inheritdoc}
 126      */
 127      public function get_transaction()
 128      {
 129          return $this->get_driver()->get_transaction();
 130      }
 131   
 132      /**
 133      * {@inheritdoc}
 134      */
 135      public function get_sql_time()
 136      {
 137          return $this->get_driver()->get_sql_time();
 138      }
 139   
 140      /**
 141      * {@inheritdoc}
 142      */
 143      public function get_sql_error_returned()
 144      {
 145          return $this->get_driver()->get_sql_error_returned();
 146      }
 147   
 148      /**
 149      * {@inheritdoc}
 150      */
 151      public function get_multi_insert()
 152      {
 153          return $this->get_driver()->get_multi_insert();
 154      }
 155   
 156      /**
 157      * {@inheritdoc}
 158      */
 159      public function set_multi_insert($multi_insert)
 160      {
 161          $this->get_driver()->set_multi_insert($multi_insert);
 162      }
 163   
 164      /**
 165      * {@inheritdoc}
 166      */
 167      public function get_row_count($table_name)
 168      {
 169          return $this->get_driver()->get_row_count($table_name);
 170      }
 171   
 172      /**
 173      * {@inheritdoc}
 174      */
 175      public function get_estimated_row_count($table_name)
 176      {
 177          return $this->get_driver()->get_estimated_row_count($table_name);
 178      }
 179   
 180      /**
 181      * {@inheritdoc}
 182      */
 183      public function sql_lower_text($column_name)
 184      {
 185          return $this->get_driver()->sql_lower_text($column_name);
 186      }
 187   
 188      /**
 189      * {@inheritdoc}
 190      */
 191      public function sql_error($sql = '')
 192      {
 193          return $this->get_driver()->sql_error($sql);
 194      }
 195   
 196      /**
 197      * {@inheritdoc}
 198      */
 199      public function sql_buffer_nested_transactions()
 200      {
 201          return $this->get_driver()->sql_buffer_nested_transactions();
 202      }
 203   
 204      /**
 205      * {@inheritdoc}
 206      */
 207      public function sql_bit_or($column_name, $bit, $compare = '')
 208      {
 209          return $this->get_driver()->sql_bit_or($column_name, $bit, $compare);
 210      }
 211   
 212      /**
 213      * {@inheritdoc}
 214      */
 215      public function sql_server_info($raw = false, $use_cache = true)
 216      {
 217          return $this->get_driver()->sql_server_info($raw, $use_cache);
 218      }
 219   
 220      /**
 221      * {@inheritdoc}
 222      */
 223      public function sql_return_on_error($fail = false)
 224      {
 225          return $this->get_driver()->sql_return_on_error($fail);
 226      }
 227   
 228      /**
 229      * {@inheritdoc}
 230      */
 231      public function sql_build_array($query, $assoc_ary = array())
 232      {
 233          return $this->get_driver()->sql_build_array($query, $assoc_ary);
 234      }
 235   
 236      /**
 237      * {@inheritdoc}
 238      */
 239      public function sql_fetchrowset($query_id = false)
 240      {
 241          return $this->get_driver()->sql_fetchrowset($query_id);
 242      }
 243   
 244      /**
 245      * {@inheritdoc}
 246      */
 247      public function sql_transaction($status = 'begin')
 248      {
 249          return $this->get_driver()->sql_transaction($status);
 250      }
 251   
 252      /**
 253      * {@inheritdoc}
 254      */
 255      public function sql_concatenate($expr1, $expr2)
 256      {
 257          return $this->get_driver()->sql_concatenate($expr1, $expr2);
 258      }
 259   
 260      /**
 261      * {@inheritdoc}
 262      */
 263      public function sql_case($condition, $action_true, $action_false = false)
 264      {
 265          return $this->get_driver()->sql_case($condition, $action_true, $action_false);
 266      }
 267   
 268      /**
 269      * {@inheritdoc}
 270      */
 271      public function sql_build_query($query, $array)
 272      {
 273          return $this->get_driver()->sql_build_query($query, $array);
 274      }
 275   
 276      /**
 277      * {@inheritdoc}
 278      */
 279      public function sql_fetchfield($field, $rownum = false, $query_id = false)
 280      {
 281          return $this->get_driver()->sql_fetchfield($field, $rownum, $query_id);
 282      }
 283   
 284      /**
 285      * {@inheritdoc}
 286      */
 287      public function sql_fetchrow($query_id = false)
 288      {
 289          return $this->get_driver()->sql_fetchrow($query_id);
 290      }
 291   
 292      /**
 293      * {@inheritdoc}
 294      */
 295      public function cast_expr_to_bigint($expression)
 296      {
 297          return $this->get_driver()->cast_expr_to_bigint($expression);
 298      }
 299   
 300      /**
 301      * {@inheritdoc}
 302      */
 303      public function sql_nextid()
 304      {
 305          return $this->get_driver()->sql_nextid();
 306      }
 307   
 308      /**
 309      * {@inheritdoc}
 310      */
 311      public function sql_add_num_queries($cached = false)
 312      {
 313          return $this->get_driver()->sql_add_num_queries($cached);
 314      }
 315   
 316      /**
 317      * {@inheritdoc}
 318      */
 319      public function sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
 320      {
 321          return $this->get_driver()->sql_query_limit($query, $total, $offset, $cache_ttl);
 322      }
 323   
 324      /**
 325      * {@inheritdoc}
 326      */
 327      public function sql_query($query = '', $cache_ttl = 0)
 328      {
 329          return $this->get_driver()->sql_query($query, $cache_ttl);
 330      }
 331   
 332      /**
 333      * {@inheritdoc}
 334      */
 335      public function cast_expr_to_string($expression)
 336      {
 337          return $this->get_driver()->cast_expr_to_string($expression);
 338      }
 339   
 340      /**
 341      * {@inheritdoc}
 342      */
 343      public function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
 344      {
 345          throw new \Exception('Disabled method.');
 346      }
 347   
 348      /**
 349      * {@inheritdoc}
 350      */
 351      public function sql_bit_and($column_name, $bit, $compare = '')
 352      {
 353          return $this->get_driver()->sql_bit_and($column_name, $bit, $compare);
 354      }
 355   
 356      /**
 357      * {@inheritdoc}
 358      */
 359      public function sql_freeresult($query_id = false)
 360      {
 361          return $this->get_driver()->sql_freeresult($query_id);
 362      }
 363   
 364      /**
 365      * {@inheritdoc}
 366      */
 367      public function sql_num_queries($cached = false)
 368      {
 369          return $this->get_driver()->sql_num_queries($cached);
 370      }
 371   
 372      /**
 373      * {@inheritdoc}
 374      */
 375      public function sql_multi_insert($table, $sql_ary)
 376      {
 377          return $this->get_driver()->sql_multi_insert($table, $sql_ary);
 378      }
 379   
 380      /**
 381      * {@inheritdoc}
 382      */
 383      public function sql_affectedrows()
 384      {
 385          return $this->get_driver()->sql_affectedrows();
 386      }
 387   
 388      /**
 389      * {@inheritdoc}
 390      */
 391      public function sql_close()
 392      {
 393          return $this->get_driver()->sql_close();
 394      }
 395   
 396      /**
 397      * {@inheritdoc}
 398      */
 399      public function sql_rowseek($rownum, &$query_id)
 400      {
 401          return $this->get_driver()->sql_rowseek($rownum, $query_id);
 402      }
 403   
 404      /**
 405      * {@inheritdoc}
 406      */
 407      public function sql_escape($msg)
 408      {
 409          return $this->get_driver()->sql_escape($msg);
 410      }
 411   
 412      /**
 413      * {@inheritdoc}
 414      */
 415      public function sql_like_expression($expression)
 416      {
 417          return $this->get_driver()->sql_like_expression($expression);
 418      }
 419   
 420      /**
 421      * {@inheritdoc}
 422      */
 423      public function sql_not_like_expression($expression)
 424      {
 425          return $this->get_driver()->sql_not_like_expression($expression);
 426      }
 427   
 428      /**
 429      * {@inheritdoc}
 430      */
 431      public function sql_report($mode, $query = '')
 432      {
 433          return $this->get_driver()->sql_report($mode, $query);
 434      }
 435   
 436      /**
 437      * {@inheritdoc}
 438      */
 439      public function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
 440      {
 441          return $this->get_driver()->sql_in_set($field, $array, $negate, $allow_empty_set);
 442      }
 443  }
 444