ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
class for checking external links in page objects Normally used in Cron jobs, but should be extensible for use in learning modules. More...
Public Member Functions | |
__construct ($db, $a_validate_all=true) | |
setCheckPeriod ($a_period) | |
getCheckPeriod () | |
setMailStatus ($a_status) | |
getMailStatus () | |
__setType ($a_type) | |
__getType () | |
setObjId ($a_page_id) | |
getObjId () | |
getValidateAll () | |
getLogMessages () | |
getInvalidLinks () | |
getInvalidLinksFromDB () | |
getLastCheckTimestamp () | |
checkWebResourceLinks () | |
checkLinks () | |
__txt ($language, $key, $module='common') | |
__fetchUserData ($a_usr_id) | |
__getTitle ($a_lm_obj_id) | |
__sendMail () | |
__getNotifyLinks () | |
__clearInvalidLinks () | |
__appendInvalidLink ($a_link) | |
__appendLogMessage ($a_string) | |
__clearLogMessages () | |
__getLinks ($a_page) | |
__getWebResourceLinks () | |
__validateLinks ($a_links) | |
$a_links Format: Array ( [1] => Array ( ['scheme'] => intern/http/https, ['ref_id'] => ILIAS ref ID, ['obj_type'] => ILIAS object type, ['complete'] => link to check, ), [2]=> ... More... | |
__getObjIdByPageId ($a_page_id) | |
__isInvalid ($a_page_id, $a_url) | |
__saveInDB () | |
__checkNotify () | |
__clearDBData () | |
Data Fields | |
$db = null | |
$log_messages = array() | |
$invalid_links = array() | |
$validate_all = true | |
$mail_status = false | |
$page_id = 0 | |
Protected Member Functions | |
createPermanentLink ($a_obj_id, $a_usr_id, $a_obj_type) | |
creates a permanent link More... | |
class for checking external links in page objects Normally used in Cron jobs, but should be extensible for use in learning modules.
In this case set second parameter of contructor = false, and use setPageObjectId()
Definition at line 12 of file class.ilLinkChecker.php.
ilLinkChecker::__construct | ( | $db, | |
$a_validate_all = true |
|||
) |
ilLinkChecker::__appendInvalidLink | ( | $a_link | ) |
Definition at line 359 of file class.ilLinkChecker.php.
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__appendLogMessage | ( | $a_string | ) |
Definition at line 365 of file class.ilLinkChecker.php.
Referenced by __sendMail(), __validateLinks(), checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__checkNotify | ( | ) |
Definition at line 599 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $query, $res, and getInvalidLinks().
Referenced by __saveInDB().
ilLinkChecker::__clearDBData | ( | ) |
Definition at line 619 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $query, $res, getObjId(), and getValidateAll().
Referenced by __saveInDB().
ilLinkChecker::__clearInvalidLinks | ( | ) |
Definition at line 355 of file class.ilLinkChecker.php.
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__clearLogMessages | ( | ) |
Definition at line 369 of file class.ilLinkChecker.php.
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__fetchUserData | ( | $a_usr_id | ) |
Definition at line 216 of file class.ilLinkChecker.php.
References $data, $DIC, $ilDB, $r, $row, and ilDBConstants\FETCHMODE_OBJECT.
ilLinkChecker::__getLinks | ( | $a_page | ) |
Definition at line 374 of file class.ilLinkChecker.php.
References $i, and __getObjIdByPageId().
Referenced by checkLinks().
ilLinkChecker::__getNotifyLinks | ( | ) |
Definition at line 349 of file class.ilLinkChecker.php.
Referenced by __sendMail().
ilLinkChecker::__getObjIdByPageId | ( | $a_page_id | ) |
Definition at line 549 of file class.ilLinkChecker.php.
References $res, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by __getLinks().
ilLinkChecker::__getTitle | ( | $a_lm_obj_id | ) |
Definition at line 239 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $r, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by __sendMail().
ilLinkChecker::__getType | ( | ) |
Definition at line 63 of file class.ilLinkChecker.php.
References $type.
Referenced by __sendMail().
ilLinkChecker::__getWebResourceLinks | ( | ) |
Definition at line 405 of file class.ilLinkChecker.php.
References $DIC, and getObjId().
Referenced by checkWebResourceLinks().
ilLinkChecker::__isInvalid | ( | $a_page_id, | |
$a_url | |||
) |
Definition at line 559 of file class.ilLinkChecker.php.
References getInvalidLinks().
ilLinkChecker::__saveInDB | ( | ) |
Definition at line 570 of file class.ilLinkChecker.php.
References $DIC, $id, $ilDB, $query, $res, __checkNotify(), __clearDBData(), getInvalidLinks(), and getMailStatus().
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__sendMail | ( | ) |
Definition at line 253 of file class.ilLinkChecker.php.
References $data, $DIC, $ilUser, __appendLogMessage(), __getNotifyLinks(), __getTitle(), __getType(), __txt(), ilLinkCheckNotify\_getAllNotifiers(), createPermanentLink(), ilObjectFactory\getInstanceByObjId(), and getMailStatus().
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__setType | ( | $a_type | ) |
Definition at line 59 of file class.ilLinkChecker.php.
References $a_type.
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::__txt | ( | $language, | |
$key, | |||
$module = 'common' |
|||
) |
Definition at line 211 of file class.ilLinkChecker.php.
References $key, $language, $module, and ilLanguage\_lookupEntry().
Referenced by __sendMail().
ilLinkChecker::__validateLinks | ( | $a_links | ) |
$a_links Format: Array ( [1] => Array ( ['scheme'] => intern/http/https, ['ref_id'] => ILIAS ref ID, ['obj_type'] => ILIAS object type, ['complete'] => link to check, ), [2]=> ...
)
array | $a_links | Format: |
Definition at line 468 of file class.ilLinkChecker.php.
References $DIC, $tree, __appendLogMessage(), ilProxySettings\_getInstance(), ilCurlConnection\_isCurlExtensionLoaded(), ilObject\_lookupObjId(), ilObject\_lookupType(), and ilLoggerFactory\getLogger().
Referenced by checkLinks(), and checkWebResourceLinks().
ilLinkChecker::checkLinks | ( | ) |
Definition at line 152 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $query, $res, $row, __appendInvalidLink(), __appendLogMessage(), __clearInvalidLinks(), __clearLogMessages(), __getLinks(), __saveInDB(), __sendMail(), __setType(), __validateLinks(), ilDBConstants\FETCHMODE_OBJECT, getInvalidLinks(), getObjId(), and getValidateAll().
ilLinkChecker::checkWebResourceLinks | ( | ) |
Definition at line 128 of file class.ilLinkChecker.php.
References __appendInvalidLink(), __appendLogMessage(), __clearInvalidLinks(), __clearLogMessages(), __getWebResourceLinks(), __saveInDB(), __sendMail(), __setType(), __validateLinks(), and getInvalidLinks().
|
protected |
creates a permanent link
$a_obj_id | |
$a_usr_id | |
$a_obj_type |
Definition at line 327 of file class.ilLinkChecker.php.
References $DIC, $id, ilObject\_getAllReferences(), and ilLink\_getLink().
Referenced by __sendMail().
ilLinkChecker::getCheckPeriod | ( | ) |
Definition at line 45 of file class.ilLinkChecker.php.
ilLinkChecker::getInvalidLinks | ( | ) |
Definition at line 87 of file class.ilLinkChecker.php.
Referenced by __checkNotify(), __isInvalid(), __saveInDB(), checkLinks(), and checkWebResourceLinks().
ilLinkChecker::getInvalidLinksFromDB | ( | ) |
Definition at line 92 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and getObjId().
ilLinkChecker::getLastCheckTimestamp | ( | ) |
Definition at line 110 of file class.ilLinkChecker.php.
References $DIC, $ilDB, $query, $res, $row, getObjId(), and getValidateAll().
ilLinkChecker::getLogMessages | ( | ) |
Definition at line 82 of file class.ilLinkChecker.php.
ilLinkChecker::getMailStatus | ( | ) |
Definition at line 54 of file class.ilLinkChecker.php.
References $mail_status.
Referenced by __saveInDB(), and __sendMail().
ilLinkChecker::getObjId | ( | ) |
Definition at line 72 of file class.ilLinkChecker.php.
References $page_id.
Referenced by __clearDBData(), __getWebResourceLinks(), checkLinks(), getInvalidLinksFromDB(), and getLastCheckTimestamp().
ilLinkChecker::getValidateAll | ( | ) |
Definition at line 77 of file class.ilLinkChecker.php.
Referenced by __clearDBData(), checkLinks(), and getLastCheckTimestamp().
ilLinkChecker::setCheckPeriod | ( | $a_period | ) |
Definition at line 41 of file class.ilLinkChecker.php.
ilLinkChecker::setMailStatus | ( | $a_status | ) |
Definition at line 50 of file class.ilLinkChecker.php.
ilLinkChecker::setObjId | ( | $a_page_id | ) |
Definition at line 68 of file class.ilLinkChecker.php.
ilLinkChecker::$db = null |
Definition at line 14 of file class.ilLinkChecker.php.
Referenced by __construct().
ilLinkChecker::$invalid_links = array() |
Definition at line 16 of file class.ilLinkChecker.php.
ilLinkChecker::$log_messages = array() |
Definition at line 15 of file class.ilLinkChecker.php.
ilLinkChecker::$mail_status = false |
Definition at line 19 of file class.ilLinkChecker.php.
Referenced by getMailStatus().
ilLinkChecker::$page_id = 0 |
Definition at line 20 of file class.ilLinkChecker.php.
Referenced by getObjId().
ilLinkChecker::$validate_all = true |
Definition at line 18 of file class.ilLinkChecker.php.