-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6623f1e
commit 4edd426
Showing
21 changed files
with
494 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.5.1 | ||
4.5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/include/validators/class-wc-retailcrm-validator-exception.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
class ValidatorException extends Exception | ||
{ | ||
public function __construct(string $message = '', int $code = 0) | ||
{ | ||
// Add filter, if you need customization message of exception | ||
parent::__construct(apply_filters('retailcrm_validator_message', $message), $code); | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/include/validators/url-validator/class-wc-retailcrm-url-constraint.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
if (!class_exists('WC_Retailcrm_Url_Constraint')) : | ||
/** | ||
* PHP version 7.0 | ||
* | ||
* Class WC_Retailcrm_Url_Constraint - Constraint for CRM URL. | ||
* | ||
* @category Integration | ||
* @author RetailCRM <[email protected]> | ||
* @license http://retailcrm.ru Proprietary | ||
* @link http://retailcrm.ru | ||
* @see http://help.retailcrm.ru | ||
*/ | ||
class WC_Retailcrm_Url_Constraint | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $schemeFail = 'Incorrect protocol. Only https is allowed.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $pathFail = 'The domain path must be empty.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $portFail = 'The port does not need to be specified.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $domainFail = 'An invalid domain is specified.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $noValidUrlHost = 'Incorrect Host URL.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $noValidUrl = 'Incorrect URL.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $queryFail = 'The query must be blank.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $fragmentFail = 'The fragment should be blank.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $authFail = 'No need to provide authorization data.'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $getFileError = 'Unable to obtain reference values.'; | ||
} | ||
endif; |
Oops, something went wrong.