You are here

class DeveloperToUserConversionAttributeDoesNotExistException in Apigee Edge 8

Thrown when source attribute does not exist in developer.

Hierarchy

Expanded class hierarchy of DeveloperToUserConversionAttributeDoesNotExistException

2 files declare their use of DeveloperToUserConversionAttributeDoesNotExistException
UserCreateUpdate.php in src/Job/UserCreateUpdate.php
UserDeveloperConverter.php in src/UserDeveloperConverter.php

File

src/Exception/DeveloperToUserConversionAttributeDoesNotExistException.php, line 28

Namespace

Drupal\apigee_edge\Exception
View source
class DeveloperToUserConversionAttributeDoesNotExistException extends DeveloperToUserConversionException {

  /**
   * Attribute name.
   *
   * @var string
   */
  protected $attributeName;

  /**
   * DeveloperToUserConversionAttributeDoesNotExistException constructor.
   *
   * @param string $attribute_name
   *   Name of the attribute.
   * @param \Drupal\apigee_edge\Entity\DeveloperInterface $developer
   *   Developer object.
   * @param string $message
   *   The Exception message.
   * @param int $code
   *   The error code.
   * @param \Throwable|null $previous
   *   The previous throwable used for the exception chaining.
   */
  public function __construct(string $attribute_name, DeveloperInterface $developer, string $message = '"@attribute" attribute does not exist in "@developer" developer.', int $code = 0, ?\Throwable $previous = NULL) {
    $this->attributeName = $attribute_name;
    $message = strtr($message, [
      '@attribute' => $attribute_name,
    ]);
    parent::__construct($developer, $message, $code, $previous);
  }

  /**
   * Returns the name of the problematic attribute.
   *
   * @return string
   *   Attribute name.
   */
  public function getAttributeName() : string {
    return $this->attributeName;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DeveloperToUserConversionAttributeDoesNotExistException::$attributeName protected property Attribute name.
DeveloperToUserConversionAttributeDoesNotExistException::getAttributeName public function Returns the name of the problematic attribute.
DeveloperToUserConversionAttributeDoesNotExistException::__construct public function DeveloperToUserConversionAttributeDoesNotExistException constructor. Overrides DeveloperToUserConversionException::__construct
DeveloperToUserConversionException::$developer protected property Developer object.
DeveloperToUserConversionException::getDeveloper public function Returns the problematic developer.