ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAccessibilitySequentialDocumentEvaluation Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAccessibilitySequentialDocumentEvaluation:
+ Collaboration diagram for ilAccessibilitySequentialDocumentEvaluation:

Public Member Functions

 __construct (ilAccessibilityDocumentCriteriaEvaluation $evaluation, ilObjUser $user, ilLogger $log, array $possibleDocuments)
 
 document ()
 
 hasDocument ()
 
 document ()
 
 hasDocument ()
 

Protected Member Functions

 getMatchingDocuments ()
 

Protected Attributes

ilAccessibilityDocumentCriteriaEvaluation $evaluation
 
ilObjUser $user
 
array $matchingDocuments = null
 
array $possibleDocuments = []
 
ilLogger $log
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Interface ilAccessibilitySequentialDocumentEvaluation

Definition at line 22 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

Constructor & Destructor Documentation

◆ __construct()

ilAccessibilitySequentialDocumentEvaluation::__construct ( ilAccessibilityDocumentCriteriaEvaluation  $evaluation,
ilObjUser  $user,
ilLogger  $log,
array  $possibleDocuments 
)

Member Function Documentation

◆ document()

ilAccessibilitySequentialDocumentEvaluation::document ( )
Returns
ilAccessibilitySignableDocument
Exceptions
ilAccessibilityNoSignableDocumentFoundException

Implements ilAccessibilityDocumentEvaluation.

Definition at line 73 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

74 {
76 if (count($matchingDocuments) > 0) {
77 return $matchingDocuments[0];
78 }
79
81 'Could not find any accessibility control concept document for the passed user (id: %s|login: %s)',
82 $this->user->getId(),
83 $this->user->getLogin()
84 ));
85 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $matchingDocuments, getMatchingDocuments(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getMatchingDocuments()

ilAccessibilitySequentialDocumentEvaluation::getMatchingDocuments ( )
protected
Returns
ilAccessibilitySignableDocument[]

Definition at line 47 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

47 : array
48 {
49 if (null === $this->matchingDocuments) {
50 $this->matchingDocuments = [];
51
52 $this->log->debug(sprintf(
53 'Evaluating document for user "%s" (id: %s) ...',
54 $this->user->getLogin(),
55 $this->user->getId()
56 ));
57
58 foreach ($this->possibleDocuments as $document) {
59 if ($this->evaluation->evaluate($document)) {
60 $this->matchingDocuments[] = $document;
61 }
62 }
63
64 $this->log->debug(sprintf(
65 '%s matching document(s) found',
66 count($this->matchingDocuments)
67 ));
68 }
69
71 }

References $matchingDocuments, and ILIAS\Repository\user().

Referenced by document(), and hasDocument().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasDocument()

ilAccessibilitySequentialDocumentEvaluation::hasDocument ( )
Returns
bool

Implements ilAccessibilityDocumentEvaluation.

Definition at line 87 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

87 : bool
88 {
89 return count($this->getMatchingDocuments()) > 0;
90 }

References getMatchingDocuments().

+ Here is the call graph for this function:

Field Documentation

◆ $evaluation

ilAccessibilityDocumentCriteriaEvaluation ilAccessibilitySequentialDocumentEvaluation::$evaluation
protected

Definition at line 24 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

Referenced by __construct().

◆ $log

ilLogger ilAccessibilitySequentialDocumentEvaluation::$log
protected

Definition at line 30 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

Referenced by __construct().

◆ $matchingDocuments

array ilAccessibilitySequentialDocumentEvaluation::$matchingDocuments = null
protected

◆ $possibleDocuments

array ilAccessibilitySequentialDocumentEvaluation::$possibleDocuments = []
protected

Definition at line 29 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

Referenced by __construct().

◆ $user

ilObjUser ilAccessibilitySequentialDocumentEvaluation::$user
protected

Definition at line 25 of file class.ilAccessibilitySequentialDocumentEvaluation.php.

Referenced by __construct().


The documentation for this class was generated from the following file: