use new namespace style
This commit is contained in:
parent
43be624bf6
commit
27675b7219
5 changed files with 13 additions and 7 deletions
|
@ -1,12 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace CRM\Twingle\Exceptions;
|
||||||
|
|
||||||
use CRM_Twingle_ExtensionUtil as E;
|
use CRM_Twingle_ExtensionUtil as E;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple custom exception class that indicates a problem within a class
|
* A simple custom exception class that indicates a problem within a class
|
||||||
* of the Twingle API extension.
|
* of the Twingle API extension.
|
||||||
*/
|
*/
|
||||||
class CRM_Twingle_Exceptions_BaseException extends Exception {
|
class BaseException extends \Exception {
|
||||||
|
|
||||||
private string $error_code;
|
private string $error_code;
|
||||||
private string $log_message;
|
private string $log_message;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace CRM\Twingle\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple custom exception that indicates a problem within the
|
* A simple custom exception that indicates a problem within the
|
||||||
* CRM_Twingle_Profile class
|
* CRM_Twingle_Profile class
|
||||||
*/
|
*/
|
||||||
class CRM_Twingle_Exceptions_ProfileException extends CRM_Twingle_Exceptions_BaseException {
|
class ProfileException extends BaseException {
|
||||||
|
|
||||||
public const ERROR_CODE_PROFILE_NOT_FOUND = 'profile_not_found';
|
public const ERROR_CODE_PROFILE_NOT_FOUND = 'profile_not_found';
|
||||||
public const ERROR_CODE_DEFAULT_PROFILE_NOT_FOUND = 'default_profile_not_found';
|
public const ERROR_CODE_DEFAULT_PROFILE_NOT_FOUND = 'default_profile_not_found';
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace CRM\Twingle\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple custom error indicating a problem with the validation of the
|
* A simple custom error indicating a problem with the validation of the
|
||||||
* CRM_Twingle_Profile
|
* CRM_Twingle_Profile
|
||||||
*/
|
*/
|
||||||
class CRM_Twingle_Exceptions_ProfileValidationError extends CRM_Twingle_Exceptions_BaseException {
|
class ProfileValidationError extends BaseException {
|
||||||
|
|
||||||
private string $affected_field_name;
|
private string $affected_field_name;
|
||||||
public const ERROR_CODE_PROFILE_VALIDATION_FAILED = 'profile_validation_failed';
|
public const ERROR_CODE_PROFILE_VALIDATION_FAILED = 'profile_validation_failed';
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
use CRM_Twingle_ExtensionUtil as E;
|
use CRM_Twingle_ExtensionUtil as E;
|
||||||
use CRM_Twingle_Exceptions_ProfileException as ProfileException;
|
use CRM\Twingle\Exceptions\ProfileException as ProfileException;
|
||||||
use CRM_Twingle_Exceptions_ProfileValidationError as ProfileValidationError;
|
use CRM\Twingle\Exceptions\ProfileValidationError as ProfileValidationError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form controller class
|
* Form controller class
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
declare(strict_types = 1);
|
declare(strict_types = 1);
|
||||||
|
|
||||||
use CRM_Twingle_ExtensionUtil as E;
|
use CRM_Twingle_ExtensionUtil as E;
|
||||||
use CRM_Twingle_Exceptions_ProfileException as ProfileException;
|
use CRM\Twingle\Exceptions\ProfileException as ProfileException;
|
||||||
use CRM_Twingle_Exceptions_ProfileValidationError as ProfileValidationError;
|
use CRM\Twingle\Exceptions\ProfileValidationError as ProfileValidationError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Profiles define how incoming submissions from the Twingle API are
|
* Profiles define how incoming submissions from the Twingle API are
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue