*/ class common_exception_ClassAlreadyExists extends common_Exception { /** @var \core_kernel_classes_Class */ private $class; /** * common_exception_ClassAlreadyExists constructor. * @param core_kernel_classes_Class $class * @param null $message */ public function __construct(\core_kernel_classes_Class $class, $message = null) { $this->class = $class; if ($message === null) { $message = 'Class already exists. Class uri: ' . $class->getUri(); } parent::__construct($message); } /** * @return core_kernel_classes_Class */ public function getClass() { return $this->class; } }