You are here

public function Identifier::__construct in Markdown 8.2

Identifier constructor.

Parameters

string|object $value: An identifier string or an object that implements __toString().

File

src/Annotation/Identifier.php, line 110

Class

Identifier
Creates an identifier for use in annotation objects.

Namespace

Drupal\markdown\Annotation

Code

public function __construct($value = NULL) {
  if (!$value || (!is_string($value) || is_object($value) && !method_exists($value, '__toString'))) {
    return;
  }
  $this->value = (string) $value;
}