You are here

public function InstallableLibrary::__construct in Markdown 8.2

AnnotationObject constructor.

Parameters

array $values: Optional. The initial values to populate the annotation with.

Overrides AnnotationObject::__construct

1 call to InstallableLibrary::__construct()
PeclExtension::__construct in src/Annotation/PeclExtension.php
AnnotationObject constructor.
1 method overrides InstallableLibrary::__construct()
PeclExtension::__construct in src/Annotation/PeclExtension.php
AnnotationObject constructor.

File

src/Annotation/InstallableLibrary.php, line 79

Class

InstallableLibrary

Namespace

Drupal\markdown\Annotation

Code

public function __construct($values = []) {
  parent::__construct($values);

  // Detect version of PHP extension.
  if (!isset($this->version)) {
    $version = $this
      ->detectVersion();
    if (is_array($version) && count($version) === 2) {
      list($raw, $extra) = $version;
      $this->version = $raw;
      $this->versionExtra = $extra;
    }
    else {
      $this->version = $version;
    }
  }
}