コード例 #1
0
 /**
  * Generates: Could not find '{$what}' with identifier '{$identifier}'.
  *
  * @param string $what
  * @param mixed $identifier
  * @param \Exception|null $previous
  */
 public function __construct($what, $identifier, Exception $previous = null)
 {
     $identifierStr = is_string($identifier) ? $identifier : var_export($identifier, true);
     $this->setMessageTemplate("Could not find '%what%' with identifier '%identifier%'");
     $this->setParameters(['%what%' => $what, '%identifier%' => $identifierStr]);
     parent::__construct($this->getBaseTranslation(), self::NOT_FOUND, $previous);
 }
コード例 #2
0
 /**
  * Generates: Could not find '{$what}' with identifier '{$identifier}'.
  *
  * @param string $what
  * @param mixed $identifier
  * @param \Exception|null $previous
  */
 public function __construct($what, $identifier, Exception $previous = null)
 {
     $identifierStr = is_string($identifier) ? $identifier : var_export($identifier, true);
     parent::__construct("Could not find '{$what}' with identifier '{$identifierStr}'", self::NOT_FOUND, $previous);
 }