Load.php 744 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * This file is part of the ForkBB <https://github.com/forkbb>.
  4. *
  5. * @copyright (c) Visman <mio.visman@yandex.ru, https://github.com/MioVisman>
  6. * @license The MIT License (MIT)
  7. */
  8. declare(strict_types=1);
  9. namespace ForkBB\Models\BBCodeList;
  10. use ForkBB\Models\Method;
  11. use ForkBB\Models\BBCodeList\BBCodeList;
  12. use PDO;
  13. class Load extends Method
  14. {
  15. /**
  16. * Загружает таблицу bbcode в массив
  17. */
  18. public function load(): BBCodeList
  19. {
  20. $query = 'SELECT id, bb_tag, bb_edit, bb_delete, bb_structure
  21. FROM ::bbcode
  22. ORDER BY id';
  23. $this->model->bbcodeTable = $this->c->DB->query($query)->fetchAll(PDO::FETCH_UNIQUE);
  24. return $this->model;
  25. }
  26. }