You are here

trait DependencyAccessorTrait in Libraries API 8.3

Provides a trait for classes giving access to a library dependency.

Hierarchy

1 file declares its use of DependencyAccessorTrait
InvalidLibraryDependencyException.php in src/ExternalLibrary/Exception/InvalidLibraryDependencyException.php

File

src/ExternalLibrary/Utility/DependencyAccessorTrait.php, line 8

Namespace

Drupal\libraries\ExternalLibrary\Utility
View source
trait DependencyAccessorTrait {

  /**
   * The dependency.
   *
   * @var \Drupal\libraries\ExternalLibrary\LibraryInterface
   */
  protected $dependency;

  /**
   * Returns the dependency.
   *
   * @return \Drupal\libraries\ExternalLibrary\LibraryInterface
   *   The library.
   */
  public function getLibrary() {
    return $this->dependency;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DependencyAccessorTrait::$dependency protected property The dependency.
DependencyAccessorTrait::getLibrary public function Returns the dependency.