- Add SendSmsMessage class for encapsulating SMS message data. - Create KavehNegarProvider and RanginehProvider classes implementing SmsProviderInterface for sending SMS. - Implement SmsLogRepository and SmsTemplateRepository for managing SMS logs and templates. - Develop SendSmsHandler for handling SMS sending messages. - Create SmsService to manage SMS dispatching and logging. - Add UserProfileController for managing user profiles with CRUD operations. - Implement UserProfile entity and repository for user profile data management. - Update symfony.lock and bootstrap.php for project dependencies and environment setup.
22 lines
637 B
PHP
22 lines
637 B
PHP
<?php
|
|
|
|
namespace App\Shared\Exception;
|
|
|
|
use App\Shared\Constant\ErrorCodes;
|
|
|
|
class AppException extends \RuntimeException
|
|
{
|
|
public function __construct(
|
|
private readonly string $errorCode,
|
|
?string $message = null,
|
|
private readonly int $httpStatus = 400,
|
|
private readonly ?string $field = null,
|
|
) {
|
|
parent::__construct($message ?? ErrorCodes::message($errorCode));
|
|
}
|
|
|
|
public function getErrorCode(): string { return $this->errorCode; }
|
|
public function getHttpStatus(): int { return $this->httpStatus; }
|
|
public function getField(): ?string { return $this->field; }
|
|
}
|