public function JsonLogData::setLink in JSONlog 8
Same name and namespace in other branches
- 8.2 src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::setLink()
- 3.x src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::setLink()
Parameters
mixed $link:
File
- src/Logger/ JsonLogData.php, line 183 
Class
Namespace
Drupal\jsonlog\LoggerCode
public function setLink($link) {
  // If link is an integer (or 'integer') it may be an event/error code;
  // the Inspect module exploits link for that purpose.
  if (!$link) {
    $this->link = NULL;
    $this->code = 0;
  }
  elseif (ctype_digit($link)) {
    $this->link = NULL;
    $this->code = (int) $link;
  }
  else {
    $this->link = strip_tags($link);
    $this->code = 0;
  }
}