You are here

IdAccessorTrait.php in Libraries API 8.3

File

src/ExternalLibrary/Utility/IdAccessorTrait.php
View source
<?php

namespace Drupal\libraries\ExternalLibrary\Utility;


/**
 * Provides a trait for classes that have a string identifier.
 */
trait IdAccessorTrait {

  /**
   * The ID.
   *
   * @var string
   */
  protected $id;

  /**
   * Returns the ID.
   *
   * @return string
   *   The ID.
   *
   * @see \Drupal\libraries\ExternalLibrary\LibraryInterface::getId()
   * @see \Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface::getId()
   */
  public function getId() {
    return $this->id;
  }

}

Traits

Namesort descending Description
IdAccessorTrait Provides a trait for classes that have a string identifier.