1<?
php declare(strict_types=1);
40 public function preload(array $identification_strings) : void
42 $requested = array_diff($identification_strings, $this->preloaded);
43 if (count($requested) === 0) {
47 $r = $this->db->query(
48 "SELECT *, il_resource_revision.title AS revision_title
49FROM il_resource_revision
50JOIN il_resource_info ON il_resource_revision.rid = il_resource_info.rid AND il_resource_info.version_number = il_resource_revision.version_number
51JOIN il_resource ON il_resource_revision.rid = il_resource.rid
52JOIN il_resource_stkh_u ON il_resource_stkh_u.rid = il_resource.rid
53JOIN il_resource_stkh ON il_resource_stkh_u.stakeholder_id = il_resource_stkh.id
54WHERE " . $this->db->in(
'il_resource_revision.rid', $requested,
false,
'text')
56 while (
$d = $this->db->fetchAssoc($r)) {
57 $this->resource_repository->populateFromArray(
$d);
58 $this->revision_repository->populateFromArray(
$d);
59 $this->information_repository->populateFromArray(
$d);
60 $this->stakeholder_repository->populateFromArray(
$d);
62 $this->preloaded = array_merge($this->preloaded, $identification_strings);
63 $this->preloaded = array_unique($this->preloaded);
64 }
catch (\Throwable $t) {
An exception for terminatinating execution or to throw for unit testing.
Class DBRepositoryPreloader.
preload(array $identification_strings)
__construct(\ilDBInterface $db, ResourceRepository $resource_repository, RevisionRepository $revision_repository, InformationRepository $information_repository, StakeholderRepository $stakeholder_repository)
Class StandardRepositoryPreloader.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Interface RepositoryPreloader.
Interface ResourceRepository.
Class RevisionARRepository.
Interface StakeholderRepository.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc