From 8136ac38bda667128cdb541fa59fe876c24d5d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 14 Sep 2021 13:44:03 +0200 Subject: [PATCH 1/5] Add Utils::log with enum LogLevel (prefix logs) --- src/Enums/LogLevel.php | 35 +++++++++++++++++++++++++++++++ src/Transport/Response.php | 6 ++---- src/Utils.php | 42 ++++++++++++++++++++++++++++++++++++++ src/WordPress/WPCrm.php | 12 ++++------- 4 files changed, 83 insertions(+), 12 deletions(-) create mode 100644 src/Enums/LogLevel.php diff --git a/src/Enums/LogLevel.php b/src/Enums/LogLevel.php new file mode 100644 index 0000000..72bf28c --- /dev/null +++ b/src/Enums/LogLevel.php @@ -0,0 +1,35 @@ + 'LOG_EMERG', + 'ALERT' => 'LOG_ALERT', + 'CRIT' => 'LOG_CRIT', + 'ERR' => 'LOG_ERR', + 'WARNING' => 'LOG_WARNING', + 'NOTICE' => 'LOG_NOTICE', + 'INFO' => 'LOG_INFO', + 'DEBUG' => 'LOG_DEBUG', + ]; + } +} diff --git a/src/Transport/Response.php b/src/Transport/Response.php index 7934cca..ea51c33 100644 --- a/src/Transport/Response.php +++ b/src/Transport/Response.php @@ -4,6 +4,7 @@ namespace LDC\LDCCRM\Transport; use LDC\LDCCRM\Enums\ApiError; use LDC\LDCCRM\Enums\ApiStatus; +use LDC\LDCCRM\Enums\LogLevel; use LDC\LDCCRM\Exceptions\CrmException; use LDC\LDCCRM\Utils; use Psr\Http\Message\ResponseInterface; @@ -165,10 +166,7 @@ class Response $version, $packageInfo['version'] ); - if (\class_exists('\Illuminate\Support\Facades\Log')) { - \Illuminate\Support\Facades\Log::warning($message); - } - \syslog(\LOG_WARNING, $message); + Utils::log($message, LogLevel::WARNING()); } } } diff --git a/src/Utils.php b/src/Utils.php index 7eda121..0316df5 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -4,6 +4,7 @@ namespace LDC\LDCCRM; use Dotenv\Dotenv; use LDC\LDCCRM\Enums\HttpMethods; +use LDC\LDCCRM\Enums\LogLevel; use LDC\LDCCRM\Exceptions\ValidationException; use LDC\LDCCRM\Transport\Request; use Respect\Validation\Validator; @@ -336,4 +337,45 @@ class Utils } } } + + /** + * Undocumented function + * + * @param string $message + * @return void + */ + public static function log(string $message, LogLevel $level) + { + $message = "LDC CRM: $message"; + if (\class_exists('\Illuminate\Support\Facades\Log')) { + switch ($level) { + case LogLevel::EMERG(): + \Illuminate\Support\Facades\Log::emergency($message); + break; + case LogLevel::ALERT(): + \Illuminate\Support\Facades\Log::alert($message); + break; + case LogLevel::CRIT(): + \Illuminate\Support\Facades\Log::critical($message); + break; + case LogLevel::ERR(): + \Illuminate\Support\Facades\Log::error($message); + break; + case LogLevel::WARNING(): + \Illuminate\Support\Facades\Log::warning($message); + break; + case LogLevel::NOTICE(): + \Illuminate\Support\Facades\Log::notice($message); + break; + case LogLevel::INFO(): + \Illuminate\Support\Facades\Log::info($message); + break; + case LogLevel::DEBUG(): + \Illuminate\Support\Facades\Log::debug($message); + break; + } + \Illuminate\Support\Facades\Log::warning($message); + } + \syslog(\constant($level), $message); + } } diff --git a/src/WordPress/WPCrm.php b/src/WordPress/WPCrm.php index 3263e54..8d709f5 100644 --- a/src/WordPress/WPCrm.php +++ b/src/WordPress/WPCrm.php @@ -15,12 +15,14 @@ namespace LDC\LDCCRM\WordPress; use Exception; use LDC\LDCCRM\CrmApiV2; use LDC\LDCCRM\Enums\ApiError; +use LDC\LDCCRM\Enums\LogLevel; use LDC\LDCCRM\Exceptions\ApiErrorException; use LDC\LDCCRM\Exceptions\CrmException; use LDC\LDCCRM\Models\ArcadiaMailDefault; use LDC\LDCCRM\Models\ArcadiaMailGame; use LDC\LDCCRM\Models\Customer; use LDC\LDCCRM\Models\SingleOptin; +use LDC\LDCCRM\Utils; use ReflectionClass; // phpcs:ignore Squiz.PHP.CommentedOutCode.Found @@ -443,21 +445,15 @@ class WPCrm case ApiError::apiAuthFailed(): throw $e; default: - self::logError($e->getMessage()); + Utils::log($e->getMessage(), LogLevel::NOTICE()); throw $e; } } catch (CrmException $e) { - self::logError($e->getMessage()); + Utils::log($e->getMessage(), LogLevel::EMERG()); return false; } } - private static function logError(string $message): void - { - // phpcs:ignore Squiz.PHP.DiscouragedFunctions.Found - error_log($message); - } - /** * Boot the php session if needed * From 60da6e6dcb6adcb414835e306701e3d536f3610a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 14 Sep 2021 14:23:18 +0200 Subject: [PATCH 2/5] Add some comment on Utils --- src/Utils.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Utils.php b/src/Utils.php index 0316df5..95e7879 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -323,6 +323,13 @@ class Utils return static::$packageInfos; } + /** + * Translation a string using php file lang + * + * @param string $key + * @param string $lang + * @return string + */ public static function translate(string $key, string $lang = 'fr'): string { try { @@ -339,9 +346,12 @@ class Utils } /** - * Undocumented function + * Write log using syslog + * It also write log using \Illuminate\Support\Facades\Log + * if it is present * - * @param string $message + * @param string $message The message is prefixed with "LDC CRM:" + * @param \LDC\LDCCRM\Enums\LogLevel $level The log level to apply * @return void */ public static function log(string $message, LogLevel $level) From 0fa8c8d691f72c9d48a5db296a830920ef25534a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 14 Sep 2021 14:23:31 +0200 Subject: [PATCH 3/5] Generate Doc --- .../classes/LDC-LDCCRM-CrmApiV2.html | 250 ++- .../classes/LDC-LDCCRM-Enums-ApiError.html | 96 +- .../classes/LDC-LDCCRM-Enums-ApiStatus.html | 2 + .../LDC-LDCCRM-Enums-ArcadiaMailType.html | 2 + .../LDC-LDCCRM-Enums-ArcadiaOrderType.html | 2 + .../classes/LDC-LDCCRM-Enums-Country.html | 2 + .../classes/LDC-LDCCRM-Enums-LogLevel.html | 625 ++++++ .../LDC-LDCCRM-Enums-QuestionType.html | 2 + ...C-LDCCRM-Exceptions-ApiErrorException.html | 2 + .../LDC-LDCCRM-Exceptions-CrmException.html | 2 + .../LDC-LDCCRM-Exceptions-LoginException.html | 2 + ...LDCCRM-Exceptions-ValidationException.html | 2 + .../classes/LDC-LDCCRM-Models-Answer.html | 87 +- .../LDC-LDCCRM-Models-ArcadiaMailDefault.html | 72 +- .../LDC-LDCCRM-Models-ArcadiaMailGame.html | 72 +- .../classes/LDC-LDCCRM-Models-Customer.html | 346 ++- .../classes/LDC-LDCCRM-Models-Question.html | 126 +- .../LDC-LDCCRM-Models-SingleOptin.html | 26 +- .../classes/LDC-LDCCRM-Transport-Request.html | 2 + .../LDC-LDCCRM-Transport-Response.html | 26 +- documentation/classes/LDC-LDCCRM-Utils.html | 180 +- .../classes/LDC-LDCCRM-WordPress-WPCrm.html | 1941 +++++++++++++++++ .../LDC-LDCCRM-WordPress-WPCrmAnswer.html | 444 ++++ .../LDC-LDCCRM-WordPress-WPCrmQuestion.html | 576 +++++ .../LDC-LDCCRM-WordPress-WPCrmUser.html | 1633 ++++++++++++++ .../files/examples-customerexample.html | 2 + documentation/files/src-crmapiv2.html | 2 + documentation/files/src-enums-apierror.html | 2 + documentation/files/src-enums-apistatus.html | 2 + .../files/src-enums-arcadiamailtype.html | 2 + .../files/src-enums-arcadiaordertype.html | 2 + documentation/files/src-enums-country.html | 2 + .../files/src-enums-httpmethods.html | 2 + documentation/files/src-enums-loglevel.html | 151 ++ .../files/src-enums-questiontype.html | 2 + .../src-exceptions-apierrorexception.html | 2 + .../files/src-exceptions-crmexception.html | 2 + .../files/src-exceptions-loginexception.html | 2 + .../src-exceptions-validationexception.html | 2 + documentation/files/src-models-answer.html | 2 + .../files/src-models-arcadiamaildefault.html | 2 + .../files/src-models-arcadiamailgame.html | 2 + .../files/src-models-crmclientmodel.html | 2 + documentation/files/src-models-customer.html | 2 + documentation/files/src-models-question.html | 2 + .../files/src-models-singleoptin.html | 2 + .../src-providers-crmclientv2provider.html | 2 + .../files/src-transport-apiinterface.html | 2 + .../files/src-transport-request.html | 2 + .../files/src-transport-response.html | 2 + documentation/files/src-utils.html | 2 + documentation/files/src-wordpress-wpcrm.html | 191 ++ .../files/src-wordpress-wpcrmanswer.html | 191 ++ .../files/src-wordpress-wpcrmquestion.html | 191 ++ .../files/src-wordpress-wpcrmuser.html | 191 ++ documentation/graphs/classes.html | 2 + documentation/index.html | 3 + documentation/indices/files.html | 12 +- documentation/js/searchIndex.js | 562 ++++- documentation/namespaces/default.html | 2 + .../namespaces/ldc-ldccrm-enums.html | 4 + .../namespaces/ldc-ldccrm-exceptions.html | 2 + .../namespaces/ldc-ldccrm-models.html | 12 +- .../namespaces/ldc-ldccrm-providers.html | 2 + .../namespaces/ldc-ldccrm-transport.html | 2 + .../namespaces/ldc-ldccrm-wordpress.html | 151 ++ documentation/namespaces/ldc-ldccrm.html | 3 + documentation/namespaces/ldc.html | 2 + .../packages/LDCCrmClient-Wordpress.html | 150 ++ .../packages/LDCCrmClient-enums.html | 4 + .../packages/LDCCrmClient-exceptions.html | 2 + .../packages/LDCCrmClient-models.html | 12 +- .../packages/LDCCrmClient-transport.html | 2 + .../packages/LDCCrmClient-utilities.html | 2 + documentation/packages/LDCCrmClient.html | 3 + documentation/packages/None.html | 132 ++ documentation/packages/default.html | 3 + documentation/reports/deprecated.html | 2 + documentation/reports/errors.html | 2 + documentation/reports/markers.html | 470 ++-- 80 files changed, 8691 insertions(+), 337 deletions(-) create mode 100644 documentation/classes/LDC-LDCCRM-Enums-LogLevel.html create mode 100644 documentation/classes/LDC-LDCCRM-WordPress-WPCrm.html create mode 100644 documentation/classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html create mode 100644 documentation/classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html create mode 100644 documentation/classes/LDC-LDCCRM-WordPress-WPCrmUser.html create mode 100644 documentation/files/src-enums-loglevel.html create mode 100644 documentation/files/src-wordpress-wpcrm.html create mode 100644 documentation/files/src-wordpress-wpcrmanswer.html create mode 100644 documentation/files/src-wordpress-wpcrmquestion.html create mode 100644 documentation/files/src-wordpress-wpcrmuser.html create mode 100644 documentation/namespaces/ldc-ldccrm-wordpress.html create mode 100644 documentation/packages/LDCCrmClient-Wordpress.html create mode 100644 documentation/packages/None.html diff --git a/documentation/classes/LDC-LDCCRM-CrmApiV2.html b/documentation/classes/LDC-LDCCRM-CrmApiV2.html index 389f499..0219433 100644 --- a/documentation/classes/LDC-LDCCRM-CrmApiV2.html +++ b/documentation/classes/LDC-LDCCRM-CrmApiV2.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    @@ -147,7 +149,7 @@
    getCustomer() -  : Customer +  : Customer|null
    Get a customer from its hashcode or email If it does not exists a new instance @@ -171,6 +173,13 @@ to call its save method later on.
    Get all segmentation questions
    +
    + login() + +  : bool +
    +
    Test a customer credentials to see if it can login
    +
    ping() @@ -257,11 +266,38 @@ to call its save method later on. public - __construct() : mixed + __construct([string $endpoint = null ][, string $bearerToken = null ][, string $bearerPwd = null ]) : mixed
    - +
    Parameters
    +
    +
    + $endpoint + : string + = null
    +
    +
    + +
    +
    + $bearerToken + : string + = null
    +
    +
    + +
    +
    + $bearerPwd + : string + = null
    +
    +
    + +
    +
    +
    Return values
    @@ -283,7 +319,7 @@ to call its save method later on. @@ -294,7 +330,7 @@ to call its save method later on.

    public - getCustomer(string $identification) : Customer + getCustomer(string $identification) : Customer|null
    Parameters
    @@ -311,11 +347,39 @@ to call its save method later on.

    +
    + Tags + +
    +
    +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    + throws +
    +
    + ApiErrorException + +

    If any error or \LDC\LDCCRM\Enums\ApiError occurs

    +
    + +
    +
    Return values
    - Customer + Customer|null — - +

    Return null if the customer was not found

    +
    +
    @@ -359,6 +423,32 @@ to call its save method later on.

    +
    + Tags + +
    +
    +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    + throws +
    +
    + ApiErrorException + +

    If any error or \LDC\LDCCRM\Enums\ApiError occurs

    +
    + +
    +
    Return values
    Customer @@ -379,7 +469,7 @@ to call its save method later on.

    @@ -404,12 +494,114 @@ to call its save method later on.

    +
    + Tags + +
    +
    +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    + throws +
    +
    + ApiErrorException + +

    If any error or \LDC\LDCCRM\Enums\ApiError occurs

    +
    + +
    +
    Return values
    Customer — +
    +
    +

    + login() + +

    + + +

    Test a customer credentials to see if it can login

    + + + public + static login(string $email, string $password) : bool + + +
    Parameters
    +
    +
    + $email + : string +
    +
    + +
    +
    + $password + : string +
    +
    + +
    +
    + + +
    + Tags + +
    +
    +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    + throws +
    +
    + ApiErrorException + +

    If any error or \LDC\LDCCRM\Enums\ApiError occurs

    +
    + +
    +
    + +
    Return values
    + bool + — + +
    CrmApiV2.php : - 36 + 42 @@ -437,6 +629,22 @@ to call its save method later on.

    +
    + Tags + +
    +
    +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    Return values
    bool @@ -457,7 +665,7 @@ to call its save method later on.

    @@ -501,6 +709,26 @@ to call its save method later on.

    ApiError::singleOptinCustomerExists If single optin already exists

    + +
    + throws +
    +
    + CrmException + +

    if an error occurs on server side or on getting response

    +
    + +
    +
    + throws +
    +
    + ApiErrorException + +

    If any error or \LDC\LDCCRM\Enums\ApiError occurs

    +
    +
    diff --git a/documentation/classes/LDC-LDCCRM-Enums-ApiError.html b/documentation/classes/LDC-LDCCRM-Enums-ApiError.html index 44ea31c..d2c1087 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-ApiError.html +++ b/documentation/classes/LDC-LDCCRM-Enums-ApiError.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    @@ -115,7 +117,7 @@ @@ -162,6 +164,13 @@  : +
    + +
    + authorizationException() + +  : +
    @@ -197,6 +206,13 @@  :
    +
    + +
    + missingParameter() + +  : +
    @@ -324,6 +340,43 @@ check into config or .env file for your brand credentials

    +
    Return values
    + + — + + + +
    +

    + authorizationException() + +

    + + + + + public + static authorizationException() : + +

    You are maybe trying to access data that is out of your range. +This should not happen normally, it is here to allow you to handle this case. +If this happens fill a ticket on https://supportweb.ldc.fr +with some technical details

    +
    + + + +
    Return values
    — @@ -447,7 +500,7 @@ this action

    @@ -495,6 +548,40 @@ this action

    +
    Return values
    + + — + + +
    +
    +

    + missingParameter() + +

    + + + + + public + static missingParameter() : + +

    The request is missing some parameters

    +
    + + + +
    Return values
    — @@ -628,7 +715,8 @@ but it already exists

    Too many requests have been attempted. The is a throttle security. Normally you should not trigger this. -If this happens fill a ticket on https://supportweb.ldc.fr

    +If this happens fill a ticket on https://supportweb.ldc.fr +with some technical details

    @@ -688,7 +776,7 @@ you may have to look into message to get the details

    diff --git a/documentation/classes/LDC-LDCCRM-Enums-ApiStatus.html b/documentation/classes/LDC-LDCCRM-Enums-ApiStatus.html index 496c11e..7673647 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-ApiStatus.html +++ b/documentation/classes/LDC-LDCCRM-Enums-ApiStatus.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    diff --git a/documentation/classes/LDC-LDCCRM-Enums-ArcadiaMailType.html b/documentation/classes/LDC-LDCCRM-Enums-ArcadiaMailType.html index aefa978..1d36335 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-ArcadiaMailType.html +++ b/documentation/classes/LDC-LDCCRM-Enums-ArcadiaMailType.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    diff --git a/documentation/classes/LDC-LDCCRM-Enums-ArcadiaOrderType.html b/documentation/classes/LDC-LDCCRM-Enums-ArcadiaOrderType.html index 30e77b5..cadb659 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-ArcadiaOrderType.html +++ b/documentation/classes/LDC-LDCCRM-Enums-ArcadiaOrderType.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    diff --git a/documentation/classes/LDC-LDCCRM-Enums-Country.html b/documentation/classes/LDC-LDCCRM-Enums-Country.html index 4a11979..b6d5d74 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-Country.html +++ b/documentation/classes/LDC-LDCCRM-Enums-Country.html @@ -70,7 +70,9 @@
  • models
  • transport
  • utilities
  • +
  • Wordpress
  • +

    None

    diff --git a/documentation/classes/LDC-LDCCRM-Enums-LogLevel.html b/documentation/classes/LDC-LDCCRM-Enums-LogLevel.html new file mode 100644 index 0000000..eabd84b --- /dev/null +++ b/documentation/classes/LDC-LDCCRM-Enums-LogLevel.html @@ -0,0 +1,625 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
    +

    CRM V2

    + + + + + +
    + +
    +
    + + + + +
    + + +
    +

    + LogLevel + + + extends BaseEnum + + +
    + in package + +
    + + +

    + + + + + + +
    + Tags + +
    +
    +
    + subpackage +
    +
    + +

    enums

    +
    + +
    +
    + + + + + + +

    + Table of Contents + +

    + +
    +
    + ALERT() + +  : +
    +
    + +
    + CRIT() + +  : +
    +
    + +
    + DEBUG() + +  : +
    +
    + +
    + EMERG() + +  : +
    +
    + +
    + ERR() + +  : +
    +
    + +
    + INFO() + +  : +
    +
    + +
    + NOTICE() + +  : +
    +
    + +
    + WARNING() + +  : +
    +
    + +
    + values() + +  : mixed +
    +
    + +
    + + + + + + + +
    +

    + Methods + +

    +
    +

    + ALERT() + +

    + + + + + public + static ALERT() : + +

    action must be taken immediately

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + CRIT() + +

    + + + + + public + static CRIT() : + +

    critical conditions

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + DEBUG() + +

    + + + + + public + static DEBUG() : + +

    debug-level message

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + EMERG() + +

    + + + + + public + static EMERG() : + +

    system is unusable

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + ERR() + +

    + + + + + public + static ERR() : + +

    critical conditions

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + INFO() + +

    + + + + + public + static INFO() : + +

    informational message

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + NOTICE() + +

    + + + + + public + static NOTICE() : + +

    normal, but significant, condition

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + WARNING() + +

    + + + + + public + static WARNING() : + +

    critical conditions

    +
    + + + + +
    Return values
    + + — + + +
    +
    +

    + values() + +

    + + + + + protected + static values() : mixed + +
    + + + + +
    Return values
    + mixed + — + + +
    +
    + + + + +
    +
    +
    +
    +

    Search results

    + +
    +
    +
      +
      +
      +
      +
      +
      + + +
      + + + + + + + + diff --git a/documentation/classes/LDC-LDCCRM-Enums-QuestionType.html b/documentation/classes/LDC-LDCCRM-Enums-QuestionType.html index c3618f6..bfd5245 100644 --- a/documentation/classes/LDC-LDCCRM-Enums-QuestionType.html +++ b/documentation/classes/LDC-LDCCRM-Enums-QuestionType.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Exceptions-ApiErrorException.html b/documentation/classes/LDC-LDCCRM-Exceptions-ApiErrorException.html index 1a7af01..8b55c78 100644 --- a/documentation/classes/LDC-LDCCRM-Exceptions-ApiErrorException.html +++ b/documentation/classes/LDC-LDCCRM-Exceptions-ApiErrorException.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Exceptions-CrmException.html b/documentation/classes/LDC-LDCCRM-Exceptions-CrmException.html index f3920ed..f4ec4a0 100644 --- a/documentation/classes/LDC-LDCCRM-Exceptions-CrmException.html +++ b/documentation/classes/LDC-LDCCRM-Exceptions-CrmException.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Exceptions-LoginException.html b/documentation/classes/LDC-LDCCRM-Exceptions-LoginException.html index d7b172b..eec3048 100644 --- a/documentation/classes/LDC-LDCCRM-Exceptions-LoginException.html +++ b/documentation/classes/LDC-LDCCRM-Exceptions-LoginException.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Exceptions-ValidationException.html b/documentation/classes/LDC-LDCCRM-Exceptions-ValidationException.html index ddfd70f..549e16e 100644 --- a/documentation/classes/LDC-LDCCRM-Exceptions-ValidationException.html +++ b/documentation/classes/LDC-LDCCRM-Exceptions-ValidationException.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Models-Answer.html b/documentation/classes/LDC-LDCCRM-Models-Answer.html index 0721847..70b230a 100644 --- a/documentation/classes/LDC-LDCCRM-Models-Answer.html +++ b/documentation/classes/LDC-LDCCRM-Models-Answer.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -230,12 +232,19 @@ It has a method to submit answers

      +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      Serialize this object to an array
      +
      setQuestionAnswers()  : bool
      -
      Get unanswered question for a specific customer
      +
      Set unanswered question for a specific customer
      @@ -613,6 +622,39 @@ Field Type bigInt

      — + +
      +

      + jsonSerialize() + +

      + + +

      Serialize this object to an array

      + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
      Return values
      + array<string|int, mixed> + — + +
      Answer.php : - 89 + 96 -

      Get unanswered question for a specific customer

      +

      Set unanswered question for a specific customer

      public @@ -645,7 +687,8 @@ Field Type bigInt

      : string
      -
      +

      The customer hashcode

      +
      @@ -653,7 +696,8 @@ Field Type bigInt

      : int
      -
      +

      The question id

      +
      @@ -661,17 +705,46 @@ Field Type bigInt

      : array<string|int, mixed>
      -
      +

      An array with answers id

      +
      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool — - +

      true if succeeded

      +
      +
      diff --git a/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html b/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html index 83b2726..a68e3fb 100644 --- a/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html +++ b/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -301,6 +303,13 @@ the account validation status

      Fill data into this model using validation rules
      +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      Serialize this object to an array
      +
      send() @@ -631,7 +640,7 @@ using validation rules protected static array<string|int, mixed> $validation - = ['operation' => 'required|int', 'support_code' => 'required|int', 'label_type_support' => 'required|string|min:2|max:255', 'order_date' => 'required|date', 'order_num' => 'required|int', 'state_order' => ['required'], 'package_unit_weight' => 'required|int'] + = ['operation' => 'required|int', 'support_code' => 'required|int', 'label_type_support' => 'required|string|min:2|max:255', 'order_date' => 'required|date_format:Y/m/d H:i:s', 'order_num' => 'required|int', 'state_order' => ['required'], 'package_unit_weight' => 'required|int'] @@ -1112,6 +1121,39 @@ using validation rules

      — + +
      +

      + jsonSerialize() + +

      + + +

      Serialize this object to an array

      + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
      Return values
      + array<string|int, mixed> + — + +
      ArcadiaMailDefault.php : - 232 + 236 @@ -1150,6 +1192,32 @@ using validation rules

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool diff --git a/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailGame.html b/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailGame.html index 9196938..17e7c53 100644 --- a/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailGame.html +++ b/documentation/classes/LDC-LDCCRM-Models-ArcadiaMailGame.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -272,6 +274,13 @@ the account validation status

      Set prop
      +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      Serialize this object to an array
      +
      send() @@ -562,7 +571,7 @@ Required

      protected static array<string|int, mixed> $validation - = ['operation' => 'required|int', 'support_code' => 'required|int', 'label_type_support' => 'required|string|min:2|max:255', 'order_date' => 'required|date', 'code_unique' => 'required|string', 'code_on_pack' => 'sometimes|string'] + = ['operation' => 'required|int', 'support_code' => 'required|int', 'label_type_support' => 'required|string|min:2|max:255', 'order_date' => 'required|date_format:Y/m/d H:i:s', 'code_unique' => 'required|string', 'code_on_pack' => 'sometimes|string'] @@ -914,6 +923,39 @@ Required

      + +
      +

      + jsonSerialize() + +

      + + +

      Serialize this object to an array

      + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
      Return values
      + array<string|int, mixed> + — + +
      ArcadiaMailGame.php : - 149 + 153 @@ -952,6 +994,32 @@ Required

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool diff --git a/documentation/classes/LDC-LDCCRM-Models-Customer.html b/documentation/classes/LDC-LDCCRM-Models-Customer.html index e830269..dd55789 100644 --- a/documentation/classes/LDC-LDCCRM-Models-Customer.html +++ b/documentation/classes/LDC-LDCCRM-Models-Customer.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -470,6 +472,20 @@ using validation rules
      Find a customer using its email in the crm This is an alias of Customer::find()
      +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      Serialize this object to an array
      + +
      + login() + +  : bool +
      +
      Test customer credentials
      +
      save() @@ -1060,7 +1076,7 @@ at leat 1 special char

      @@ -1094,7 +1110,7 @@ the should not be visible

      @@ -1127,7 +1143,7 @@ the should not be visible

      @@ -1137,7 +1153,7 @@ the should not be visible

      protected static array<string|int, mixed> $validation - = ['hashcode' => 'required|uuid', 'email' => 'required|email:rfc,dns,spoof,filter', 'firstname' => 'required|string|min:2|max:255', 'lastname' => 'required|string|min:2|max:255', 'password' => 'required|min:8|max:255', 'birth_date' => 'required|date_format:Y-m-d', 'phone' => 'sometimes|string|min:10|max:255', 'address' => 'required|string|max:255', 'address2' => 'sometimes|string|max:255', 'city' => 'required|string|max:255', 'postcode' => 'required|string|max:255', 'country' => ['sometimes'], 'opt_in' => 'required|bool', 'status' => 'required|bool', 'last_connection' => 'sometimes|date'] + = ['hashcode' => 'required|uuid', 'email' => 'required|email', 'firstname' => 'required|string|min:2|max:255', 'lastname' => 'required|string|min:2|max:255', 'password' => 'required|min:8|max:255|mixedCase|containDigit|containSymbol', 'birth_date' => 'required|date_format:Y-m-d', 'phone' => 'sometimes|string|min:10|max:255', 'address' => 'sometimes|string|max:255', 'address2' => 'sometimes|string|max:255', 'city' => 'sometimes|string|max:255', 'postcode' => 'sometimes|string|max:255', 'country' => ['sometimes'], 'opt_in' => 'required|bool', 'status' => 'required|bool', 'last_connection' => 'sometimes|date'] @@ -1160,7 +1176,7 @@ the should not be visible

      @@ -1172,9 +1188,8 @@ the should not be visible

      $address = null -

      Validate: string

      -

      Required -Min length NA +

      Validate: sometimes,string

      +

      Min length NA Max length 255 Field Type varchar

      @@ -1199,7 +1214,7 @@ Field Type varchar

      @@ -1212,8 +1227,7 @@ Field Type varchar

      = null

      Validate: sometimes,string

      -

      Required -Min length NA +

      Min length NA Max length 255 Field Type varchar

      @@ -1275,7 +1289,7 @@ Field Type Date

      @@ -1287,9 +1301,8 @@ Field Type Date

      $city = null -

      Validate: string

      -

      Required -Min length NA +

      Validate: sometimes,string

      +

      Min length NA Max length 255 Field Type varchar

      @@ -1314,7 +1327,7 @@ Field Type varchar

      @@ -1502,7 +1515,7 @@ Field Type varchar

      @@ -1575,7 +1588,7 @@ Field Type varchar

      @@ -1691,7 +1704,7 @@ Field Type varchar

      @@ -1730,7 +1743,7 @@ Field Type varchar

      @@ -1769,7 +1782,7 @@ Field Type varchar

      @@ -1813,7 +1826,7 @@ Field Type varchar

      @@ -1857,7 +1870,7 @@ Field Type varchar

      @@ -1925,7 +1938,7 @@ Field Type varchar

      @@ -1938,6 +1951,32 @@ Field Type varchar

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool @@ -1973,6 +2012,32 @@ Field Type varchar

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool @@ -1995,7 +2060,7 @@ Field Type varchar

      @@ -2055,7 +2120,7 @@ using validation rules

      @@ -2078,11 +2143,39 @@ using validation rules

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      self|null — - +

      Return null if the customer was not found

      +
      +
      @@ -2122,12 +2215,147 @@ This is an alias of Customer::find()

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      self|null — +
      +
      +

      + jsonSerialize() + +

      + + +

      Serialize this object to an array

      + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
      Return values
      + array<string|int, mixed> + — + + +
      +
      +

      + login() + +

      + + +

      Test customer credentials

      + + + public + static login(string $email, string $password) : bool + + +
      Parameters
      +
      +
      + $email + : string +
      +
      + +
      +
      + $password + : string +
      +
      + +
      +
      + + +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      + +
      Return values
      + bool + — + +
      Customer.php : - 438 + 433 @@ -2155,6 +2383,32 @@ This is an alias of Customer::find()

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool @@ -2177,7 +2431,7 @@ This is an alias of Customer::find()

      @@ -2190,6 +2444,32 @@ This is an alias of Customer::find()

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      bool @@ -2212,7 +2492,7 @@ This is an alias of Customer::find()

      @@ -2258,7 +2538,7 @@ This is an alias of Customer::find()

      @@ -2291,7 +2571,7 @@ This is an alias of Customer::find()

      diff --git a/documentation/classes/LDC-LDCCRM-Models-Question.html b/documentation/classes/LDC-LDCCRM-Models-Question.html index 4fc4ca8..5d9fd4e 100644 --- a/documentation/classes/LDC-LDCCRM-Models-Question.html +++ b/documentation/classes/LDC-LDCCRM-Models-Question.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -280,6 +282,13 @@ It has some static methods to retrieve questions and answers

      Fill data into this model using validation rules
      +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      Serialize this object to an array
      +
      unansweredBy() @@ -866,7 +875,7 @@ Field Type tinyInteger

      @@ -879,6 +888,32 @@ Field Type tinyInteger

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      array<string|int, mixed> @@ -901,7 +936,7 @@ Field Type tinyInteger

      @@ -924,6 +959,32 @@ Field Type tinyInteger

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      array<string|int, mixed> @@ -999,6 +1060,39 @@ using validation rules

      — +
      +
      +

      + jsonSerialize() + +

      + + +

      Serialize this object to an array

      + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
      Return values
      + array<string|int, mixed> + — + +
      Question.php : - 262 + 273 @@ -1036,6 +1130,32 @@ using validation rules

      +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      Return values
      array<string|int, Question> diff --git a/documentation/classes/LDC-LDCCRM-Models-SingleOptin.html b/documentation/classes/LDC-LDCCRM-Models-SingleOptin.html index 940f886..0d4ac86 100644 --- a/documentation/classes/LDC-LDCCRM-Models-SingleOptin.html +++ b/documentation/classes/LDC-LDCCRM-Models-SingleOptin.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -231,7 +233,7 @@ protected static array<string|int, mixed> $validation - = ['email' => 'required|email:rfc,dns,spoof,filter', 'opt_in' => 'required|bool'] + = ['email' => 'required|email', 'opt_in' => 'required|bool'] @@ -258,7 +260,7 @@ @@ -302,6 +304,26 @@

      ApiError::singleOptinCustomerExists If single optin already exists

      + +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      +
      diff --git a/documentation/classes/LDC-LDCCRM-Transport-Request.html b/documentation/classes/LDC-LDCCRM-Transport-Request.html index 29d04c6..119865c 100644 --- a/documentation/classes/LDC-LDCCRM-Transport-Request.html +++ b/documentation/classes/LDC-LDCCRM-Transport-Request.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      diff --git a/documentation/classes/LDC-LDCCRM-Transport-Response.html b/documentation/classes/LDC-LDCCRM-Transport-Response.html index 86966f0..a484a50 100644 --- a/documentation/classes/LDC-LDCCRM-Transport-Response.html +++ b/documentation/classes/LDC-LDCCRM-Transport-Response.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -112,7 +114,7 @@ @@ -546,7 +548,7 @@ not a valid json @@ -579,7 +581,7 @@ not a valid json @@ -612,7 +614,7 @@ not a valid json @@ -645,7 +647,7 @@ not a valid json @@ -678,7 +680,7 @@ not a valid json @@ -711,7 +713,7 @@ not a valid json @@ -744,7 +746,7 @@ not a valid json @@ -781,7 +783,7 @@ not a valid json @@ -833,7 +835,7 @@ not a valid json @@ -877,7 +879,7 @@ not a valid json @@ -921,7 +923,7 @@ not a valid json diff --git a/documentation/classes/LDC-LDCCRM-Utils.html b/documentation/classes/LDC-LDCCRM-Utils.html index e555b21..6746f86 100644 --- a/documentation/classes/LDC-LDCCRM-Utils.html +++ b/documentation/classes/LDC-LDCCRM-Utils.html @@ -70,7 +70,9 @@
    • models
    • transport
    • utilities
    • +
    • Wordpress
    • +

      None

      @@ -111,7 +113,7 @@ @@ -185,6 +187,13 @@
      Package infos
      +
      + $translations + +  : array<string|int, mixed> +
      +
      Loaded translations
      +
      getConfig() @@ -206,6 +215,15 @@
      Generate a Request from the route name
      +
      + log() + +  : void +
      +
      Write log using syslog +It also write log using \Illuminate\Support\Facades\Log +if it is present
      +
      makeValidator() @@ -213,6 +231,13 @@
      Create a new Validator instance.
      +
      + translate() + +  : string +
      +
      Translation a string using php file lang
      + @@ -241,7 +266,7 @@ @@ -274,7 +299,7 @@ @@ -290,6 +315,39 @@ +
      +
      +

      + $translations + + + +

      + + +

      Loaded translations

      + + + private + static array<string|int, mixed> + $translations + = [] + + + + +
      @@ -311,7 +369,7 @@ @@ -375,7 +433,7 @@ @@ -408,7 +466,7 @@ @@ -455,6 +513,62 @@ — + +
      +

      + log() + +

      + + +

      Write log using syslog +It also write log using \Illuminate\Support\Facades\Log +if it is present

      + + + public + static log(string $message, LogLevel $level) : void + + +
      Parameters
      +
      +
      + $message + : string +
      +
      +

      The message is prefixed with "LDC CRM:"

      +
      + +
      +
      + $level + : LogLevel +
      +
      +

      The log level to apply

      +
      + +
      +
      + + + +
      Return values
      + void + — + +
      Utils.php : - 49 + 56 @@ -477,7 +591,7 @@ public - static makeValidator(array<string|int, mixed> $data, array<string|int, mixed> $rules[, array<string|int, mixed> $messages = [] ][, array<string|int, mixed> $customAttributes = [] ]) : Validator + static makeValidator(array<string|int, mixed> $data, array<string|int, mixed> $rules) : Validator
      Parameters
      @@ -496,17 +610,53 @@
      + + + + +
      Return values
      + Validator + — + + +
      +
      +

      + translate() + +

      + + +

      Translation a string using php file lang

      + + + public + static translate(string $key[, string $lang = 'fr' ]) : string + + +
      Parameters
      +
      - $messages - : array<string|int, mixed> - = []
      + $key + : string +
      - $customAttributes - : array<string|int, mixed> - = []
      + $lang + : string + = 'fr'
      @@ -515,7 +665,7 @@
      Return values
      - Validator + string — diff --git a/documentation/classes/LDC-LDCCRM-WordPress-WPCrm.html b/documentation/classes/LDC-LDCCRM-WordPress-WPCrm.html new file mode 100644 index 0000000..87ee0e2 --- /dev/null +++ b/documentation/classes/LDC-LDCCRM-WordPress-WPCrm.html @@ -0,0 +1,1941 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
      +

      CRM V2

      + + + + + +
      + +
      +
      + + + + +
      + + +
      +

      + WPCrm + + +
      + in package + +
      + + +

      + + + +

      Class de gestion des users en session avec Wordpress (ce truc immonde)

      + + + +
      + Tags + +
      +
      +
      + category +
      +
      + +

      API

      +
      + +
      +
      + subpackage +
      +
      + +

      Wordpress

      +
      + +
      +
      + author +
      +
      + +

      Jérémy Munsch jeremy.munsch@ldc.fr

      +
      + +
      +
      + license +
      +
      + +

      MIT https://opensource.org/licenses/MIT

      +
      + +
      +
      + link +
      +
      + / + +
      +
      + + + + + + +

      + Table of Contents + +

      + +
      +
      + $api + +  : CrmApiV2 +
      +
      The user object
      + +
      + $user + +  : WPCrmUser +
      +
      The user object
      + +
      + $sessionDestroyed + +  : mixed +
      +
      + +
      + $sessionKey + +  : mixed +
      +
      + +
      + activateUser() + +  : bool +
      +
      Toggle the current user optin value +on the current user and the crm
      + +
      + check() + +  : bool +
      +
      Check if the user is Authenticated
      + +
      + deleteUser() + +  : bool +
      +
      Delete current customer from +the local database and the crm
      + +
      + forceLogin() + +  : WPCrmUser|null +
      +
      Login user by setting user session
      + +
      + getNewUser() + +  : WPCrmUser +
      +
      Generate a new user
      + +
      + getUser() + +  : WPCrmUser|null +
      +
      Get the current user +return null if the user is not logged in
      + +
      + getUserFromApi() + +  : WPCrmUser|false +
      +
      Get the current user +return api response code if an error occurs
      + +
      + getUserFromTable() + +  : array<string|int, mixed>|null +
      +
      Get a customer from table
      + +
      + getUserFromTableByEmail() + +  : array<string|int, mixed>|null +
      +
      Get a customer from table by an email
      + +
      + getUserFromTableByUuid() + +  : array<string|int, mixed>|null +
      +
      Get a customer from table by an email
      + +
      + login() + +  : WPCrmUser|false +
      +
      Try to login with CRM API +return api response code if an error occurs
      + +
      + logout() + +  : void +
      +
      Destroy the customer from session +and therefore logout
      + +
      + saveUser() + +  : bool +
      +
      Save current customer to +the local database and on crm
      + +
      + sendArcadiaMailDefault() + +  : bool +
      +
      send An arcadia mail with type default +This methods requires to have a user in session (to be logged in)
      + +
      + sendArcadiaMailGame() + +  : bool +
      +
      send An arcadia mail with type game +This methods requires to have a user in session (to be logged in)
      + +
      + setSingleOptin() + +  : bool +
      +
      Set the single optin status for an email +on the crm
      + +
      + toggleUserOptin() + +  : bool +
      +
      Toggle the current user optin value +on the current user and the crm
      + +
      + unsetActiveUser() + +  : void +
      +
      Remove active user +to prevent WPCrm::check to return true
      + +
      + getRawProperty() + +  : mixed +
      +
      Get a property
      + +
      + bootSessionIfNeeded() + +  : void +
      +
      Boot the php session if needed
      + +
      + deleteUserFromTable() + +  : void +
      +
      Save or update the user to the table
      + +
      + getCustomer() + +  : Customer|null +
      +
      Get all customer infos
      + +
      + getWpDb() + +  : object +
      +
      Get WP 'pdo instance'
      + +
      + initLdcApi() + +  : ApiV1 +
      +
      Get the initialized API object
      + +
      + loginUserWithApi() + +  : WPCrmUser|false +
      +
      Get the current user +return null if the user is not logged in
      + +
      + makeApiV2Call() + +  : mixed|false +
      +
      Make a call using apiV2
      + +
      + query() + +  : object +
      +
      Query in DB
      + +
      + saveOrUpdateUserToTable() + +  : void +
      +
      Save or update the user to the table
      + +
      + setUser() + +  : void +
      +
      Create a user +stores it to the session +and finally saves it to the database if it does not exists
      + +
      + + + + + + +
      +

      + Properties + +

      +
      +

      + $api + + + +

      + + +

      The user object

      + + + protected + static CrmApiV2 + $api + = null + + + + + +
      +
      +

      + $user + + + +

      + + +

      The user object

      + + + protected + static WPCrmUser + $user + = null + + + + + +
      +
      +

      + $sessionDestroyed + + + +

      + + + + + private + static mixed + $sessionDestroyed + = false + +
      + +
      + + + +
      +
      +

      + $sessionKey + + + +

      + + + + + private + static mixed + $sessionKey + = 'LDC_CRM_USER' + +
      + +
      + + + +
      +
      + +
      +

      + Methods + +

      +
      +

      + activateUser() + +

      + + +

      Toggle the current user optin value +on the current user and the crm

      + + + public + static activateUser() : bool + + + + + +
      Return values
      + bool + — +

      true if the operation succeeded

      +
      + + +
      +
      +

      + check() + +

      + + +

      Check if the user is Authenticated

      + + + public + static check() : bool + + + + + +
      Return values
      + bool + — + + +
      +
      +

      + deleteUser() + +

      + + +

      Delete current customer from +the local database and the crm

      + + + public + static deleteUser() : bool + + + + + +
      Return values
      + bool + — +

      true if the operation succeeded

      +
      + + +
      +
      +

      + forceLogin() + +

      + + +

      Login user by setting user session

      + + + public + static forceLogin() : WPCrmUser|null + + + + + +
      Return values
      + WPCrmUser|null + — + + +
      +
      +

      + getNewUser() + +

      + + +

      Generate a new user

      + + + public + static getNewUser() : WPCrmUser + + + + + +
      Return values
      + WPCrmUser + — + + +
      +
      +

      + getUser() + +

      + + +

      Get the current user +return null if the user is not logged in

      + + + public + static getUser() : WPCrmUser|null + + + + + +
      Return values
      + WPCrmUser|null + — + + +
      +
      +

      + getUserFromApi() + +

      + + +

      Get the current user +return api response code if an error occurs

      + + + public + static getUserFromApi(string $identification) : WPCrmUser|false + + +
      Parameters
      +
      +
      + $identification + : string +
      +
      +

      The customer hashcode or email

      +
      + +
      +
      + + + +
      Return values
      + WPCrmUser|false + — + + +
      +
      +

      + getUserFromTable() + +

      + + +

      Get a customer from table

      + + + public + static getUserFromTable(string $hashcode) : array<string|int, mixed>|null + + +
      Parameters
      +
      +
      + $hashcode + : string +
      +
      +

      The customer hashcode

      +
      + +
      +
      + + + +
      Return values
      + array<string|int, mixed>|null + — + + +
      +
      +

      + getUserFromTableByEmail() + +

      + + +

      Get a customer from table by an email

      + + + public + static getUserFromTableByEmail(string $email) : array<string|int, mixed>|null + + +
      Parameters
      +
      +
      + $email + : string +
      +
      +

      The customer email

      +
      + +
      +
      + + + +
      Return values
      + array<string|int, mixed>|null + — + + +
      +
      +

      + getUserFromTableByUuid() + +

      + + +

      Get a customer from table by an email

      + + + public + static getUserFromTableByUuid(string $uuid) : array<string|int, mixed>|null + + +
      Parameters
      +
      +
      + $uuid + : string +
      +
      +

      The customer transaction uuid

      +
      + +
      +
      + + + +
      Return values
      + array<string|int, mixed>|null + — + + +
      +
      +

      + login() + +

      + + +

      Try to login with CRM API +return api response code if an error occurs

      + + + public + static login(string $email, string $password) : WPCrmUser|false + + +
      Parameters
      +
      +
      + $email + : string +
      +
      +

      The customer email

      +
      + +
      +
      + $password + : string +
      +
      +

      The customer password

      +
      + +
      +
      + + + +
      Return values
      + WPCrmUser|false + — + + +
      +
      +

      + logout() + +

      + + +

      Destroy the customer from session +and therefore logout

      + + + public + static logout() : void + + + + + +
      Return values
      + void + — + + +
      +
      +

      + saveUser() + +

      + + +

      Save current customer to +the local database and on crm

      + + + public + static saveUser() : bool + + + + +
      + Tags + +
      +
      +
      + throws +
      +
      + ApiErrorException + +

      with \LDC\LDCCRM\Enums\ApiError::customerExists()

      +
      + +
      +
      + +
      Return values
      + bool + — +

      true if the operation succeeded false otherwise

      +
      + + +
      +
      +

      + sendArcadiaMailDefault() + +

      + + +

      send An arcadia mail with type default +This methods requires to have a user in session (to be logged in)

      + + + public + static sendArcadiaMailDefault(ArcadiaMailDefault $mail) : bool + + +
      Parameters
      +
      +
      + $mail + : ArcadiaMailDefault +
      +
      + +
      +
      + + + +
      Return values
      + bool + — +

      true if succeed

      +
      + + +
      +
      +

      + sendArcadiaMailGame() + +

      + + +

      send An arcadia mail with type game +This methods requires to have a user in session (to be logged in)

      + + + public + static sendArcadiaMailGame(ArcadiaMailGame $mail) : bool + + +
      Parameters
      +
      +
      + $mail + : ArcadiaMailGame +
      +
      + +
      +
      + + + +
      Return values
      + bool + — +

      true if succeed

      +
      + + +
      +
      +

      + setSingleOptin() + +

      + + +

      Set the single optin status for an email +on the crm

      + + + public + static setSingleOptin(string $email, bool $opt_in) : bool + + +
      Parameters
      +
      +
      + $email + : string +
      +
      + +
      +
      + $opt_in + : bool +
      +
      + +
      +
      + + +
      + Tags + +
      +
      +
      + throws +
      +
      + ApiErrorException + +

      with \LDC\LDCCRM\Enums\ApiError::singleOptinCustomerExists()

      +
      + +
      +
      + +
      Return values
      + bool + — +

      true if the operation succeeded false otherwise

      +
      + + +
      +
      +

      + toggleUserOptin() + +

      + + +

      Toggle the current user optin value +on the current user and the crm

      + + + public + static toggleUserOptin() : bool + + + + +
      + Tags + +
      +
      +
      + throws +
      +
      + ApiErrorException + +

      with \LDC\LDCCRM\Enums\ApiError::singleOptinCustomerExists()

      +
      + +
      +
      + +
      Return values
      + bool + — +

      true if the operation succeeded

      +
      + + +
      +
      +

      + unsetActiveUser() + +

      + + +

      Remove active user +to prevent WPCrm::check to return true

      + + + public + static unsetActiveUser() : void + + + + + +
      Return values
      + void + — + + +
      +
      +

      + getRawProperty() + +

      + + +

      Get a property

      + + + protected + static getRawProperty(object $object, string $field) : mixed + + +
      Parameters
      +
      +
      + $object + : object +
      +
      +
      + +
      +
      + $field + : string +
      +
      + +
      +
      + + + +
      Return values
      + mixed + — + + +
      +
      +

      + bootSessionIfNeeded() + +

      + + +

      Boot the php session if needed

      + + + private + static bootSessionIfNeeded() : void + + + + + +
      Return values
      + void + — + + +
      +
      +

      + deleteUserFromTable() + +

      + + +

      Save or update the user to the table

      + + + private + static deleteUserFromTable() : void + + + + + +
      Return values
      + void + — + + +
      +
      +

      + getCustomer() + +

      + + +

      Get all customer infos

      + + + private + static getCustomer() : Customer|null + + + + + +
      Return values
      + Customer|null + — + + +
      +
      +

      + getWpDb() + +

      + + +

      Get WP 'pdo instance'

      + + + private + static getWpDb() : object + + + + + +
      Return values
      + object + — +

      The $wpdb variable

      +
      + + +
      +
      +

      + initLdcApi() + +

      + + +

      Get the initialized API object

      + + + private + static initLdcApi() : ApiV1 + + + + + +
      Return values
      + ApiV1 + — + + +
      +
      +

      + loginUserWithApi() + +

      + + +

      Get the current user +return null if the user is not logged in

      + + + private + static loginUserWithApi(string $email, string $password) : WPCrmUser|false + + +
      Parameters
      +
      +
      + $email + : string +
      +
      +

      The customer email

      +
      + +
      +
      + $password + : string +
      +
      +

      The customer password

      +
      + +
      +
      + + +
      + Tags + +
      +
      +
      + throws +
      +
      + CrmException + +

      if an error occurs on server side or on getting response

      +
      + +
      +
      + throws +
      +
      + ApiErrorException + +

      If any error or \LDC\LDCCRM\Enums\ApiError occurs

      +
      + +
      +
      + +
      Return values
      + WPCrmUser|false + — + + +
      +
      +

      + makeApiV2Call() + +

      + + +

      Make a call using apiV2

      + + + private + static makeApiV2Call(mixed $obj, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed|false + + +
      Parameters
      +
      +
      + $obj + : mixed +
      +
      +
      + +
      +
      + $method + : string +
      +
      + +
      +
      + $arguments + : array<string|int, mixed> + = []
      +
      + +
      +
      + + + +
      Return values
      + mixed|false + — + + +
      +
      +

      + query() + +

      + + +

      Query in DB

      + + + private + static query(string $query[, array<string|int, mixed> $params = [] ]) : object + + +
      Parameters
      +
      +
      + $query + : string +
      +
      +

      La request avec les variables en points d'interrogation

      +
      + +
      +
      + $params + : array<string|int, mixed> + = []
      +
      +

      Les paramètres des la requète

      +
      + +
      +
      + + + +
      Return values
      + object + — +

      Containing the row columns

      +
      + + +
      +
      +

      + saveOrUpdateUserToTable() + +

      + + +

      Save or update the user to the table

      + + + private + static saveOrUpdateUserToTable() : void + + + + + +
      Return values
      + void + — + + +
      +
      +

      + setUser() + +

      + + +

      Create a user +stores it to the session +and finally saves it to the database if it does not exists

      + + + private + static setUser(Customer $customer) : void + + +
      Parameters
      +
      +
      + $customer + : Customer +
      +
      +
      + +
      +
      + + + +
      Return values
      + void + — + + +
      +
      + + + + +
      +
      +
      +
      +

      Search results

      + +
      +
      +
        +
        +
        +
        +
        +
        + + +
        + + + + + + + + diff --git a/documentation/classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html new file mode 100644 index 0000000..13fcef2 --- /dev/null +++ b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html @@ -0,0 +1,444 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
        +

        CRM V2

        + + + + + +
        + +
        +
        + + + + +
        + + +
        +

        + WPCrmAnswer + + +
        + in package + +
        + + +

        + + + +

        Class de gestion de la segmentation question avec Wordpress (ce truc immonde)

        + + + +
        + Tags + +
        +
        +
        + category +
        +
        + +

        API

        +
        + +
        +
        + subpackage +
        +
        + +

        Wordpress

        +
        + +
        +
        + author +
        +
        + +

        Jérémy Munsch jeremy.munsch@ldc.fr

        +
        + +
        +
        + license +
        +
        + +

        MIT https://opensource.org/licenses/MIT

        +
        + +
        +
        + link +
        +
        + / + +
        +
        + + + + + + +

        + Table of Contents + +

        + +
        +
        + setQuestionAnswers() + +  : bool +
        +
        Set unanswered question for a specific customer
        + +
        + getRawProperty() + +  : mixed +
        +
        Get a property
        + +
        + + + + + + + +
        +

        + Methods + +

        +
        +

        + setQuestionAnswers() + +

        + + +

        Set unanswered question for a specific customer

        + + + public + setQuestionAnswers(WPCrmUser $user, int $questionId, array<string|int, mixed> $answersId) : bool + + +
        Parameters
        +
        +
        + $user + : WPCrmUser +
        +
        +
        + +
        +
        + $questionId + : int +
        +
        +

        The question id

        +
        + +
        +
        + $answersId + : array<string|int, mixed> +
        +
        +

        An array with answers id

        +
        + +
        +
        + + +
        + Tags + +
        +
        +
        + throws +
        +
        + CrmException + +

        if an error occurs on server side or on getting response

        +
        + +
        +
        + throws +
        +
        + ApiErrorException + +

        If any error or \LDC\LDCCRM\Enums\ApiError occurs

        +
        + +
        +
        + +
        Return values
        + bool + — +

        true if succeeded

        +
        + + +
        +
        +

        + getRawProperty() + +

        + + +

        Get a property

        + + + protected + static getRawProperty(object $object, string $field) : mixed + + +
        Parameters
        +
        +
        + $object + : object +
        +
        +
        + +
        +
        + $field + : string +
        +
        + +
        +
        + + + +
        Return values
        + mixed + — + + +
        +
        + + + + +
        +
        +
        +
        +

        Search results

        + +
        +
        +
          +
          +
          +
          +
          +
          + + +
          + + + + + + + + diff --git a/documentation/classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html new file mode 100644 index 0000000..8229379 --- /dev/null +++ b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html @@ -0,0 +1,576 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
          +

          CRM V2

          + + + + + +
          + +
          +
          + + + + +
          + + +
          +

          + WPCrmQuestion + + +
          + in package + +
          + + +

          + + + +

          Class de gestion de la segmentation question avec Wordpress (ce truc immonde)

          + + + +
          + Tags + +
          +
          +
          + category +
          +
          + +

          API

          +
          + +
          +
          + subpackage +
          +
          + +

          Wordpress

          +
          + +
          +
          + author +
          +
          + +

          Jérémy Munsch jeremy.munsch@ldc.fr

          +
          + +
          +
          + license +
          +
          + +

          MIT https://opensource.org/licenses/MIT

          +
          + +
          +
          + link +
          +
          + / + +
          +
          + + + + + + +

          + Table of Contents + +

          + +
          +
          + allWithCustomerAnswers() + +  : array<string|int, mixed> +
          +
          Get all the questions with user answers
          + +
          + getAll() + +  : array<string|int, mixed> +
          +
          Get all questions only
          + +
          + unansweredBy() + +  : array<string|int, Question> +
          +
          Get unanswered question for a specific customer
          + +
          + getRawProperty() + +  : mixed +
          +
          Get a property
          + +
          + + + + + + + +
          +

          + Methods + +

          +
          +

          + allWithCustomerAnswers() + +

          + + +

          Get all the questions with user answers

          + + + public + static allWithCustomerAnswers(WPCrmUser $user) : array<string|int, mixed> + + +
          Parameters
          +
          +
          + $user + : WPCrmUser +
          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + throws +
          +
          + CrmException + +

          if an error occurs on server side or on getting response

          +
          + +
          +
          + throws +
          +
          + ApiErrorException + +

          If any error or \LDC\LDCCRM\Enums\ApiError occurs

          +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +

          [ +0 => [ +'question' => \LDC\LDCCRM\Models\Question, +'customerAnswers' => \LDC\LDCCRM\Models\Answer[] +] +]

          +

          with \LDC\LDCCRM\Models\Question[] +and the customer \LDC\LDCCRM\Models\Answer[]

          +
          + + +
          +
          +

          + getAll() + +

          + + +

          Get all questions only

          + + + public + static getAll() : array<string|int, mixed> + + + + +
          + Tags + +
          +
          +
          + throws +
          +
          + CrmException + +

          if an error occurs on server side or on getting response

          +
          + +
          +
          + throws +
          +
          + ApiErrorException + +

          If any error or \LDC\LDCCRM\Enums\ApiError occurs

          +
          + +
          +
          + +
          Return values
          + array<string|int, mixed> + — +

          with \LDC\LDCCRM\Models\Question[]

          +
          + + +
          +
          +

          + unansweredBy() + +

          + + +

          Get unanswered question for a specific customer

          + + + public + static unansweredBy(WPCrmUser $user) : array<string|int, Question> + + +
          Parameters
          +
          +
          + $user + : WPCrmUser +
          +
          + +
          +
          + + +
          + Tags + +
          +
          +
          + throws +
          +
          + CrmException + +

          if an error occurs on server side or on getting response

          +
          + +
          +
          + throws +
          +
          + ApiErrorException + +

          If any error or \LDC\LDCCRM\Enums\ApiError occurs

          +
          + +
          +
          + +
          Return values
          + array<string|int, Question> + — + + +
          +
          +

          + getRawProperty() + +

          + + +

          Get a property

          + + + protected + static getRawProperty(object $object, string $field) : mixed + + +
          Parameters
          +
          +
          + $object + : object +
          +
          +
          + +
          +
          + $field + : string +
          +
          + +
          +
          + + + +
          Return values
          + mixed + — + + +
          +
          + + + + +
          +
          +
          +
          +

          Search results

          + +
          +
          +
            +
            +
            +
            +
            +
            + + +
            + + + + + + + + diff --git a/documentation/classes/LDC-LDCCRM-WordPress-WPCrmUser.html b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmUser.html new file mode 100644 index 0000000..be04cdb --- /dev/null +++ b/documentation/classes/LDC-LDCCRM-WordPress-WPCrmUser.html @@ -0,0 +1,1633 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
            +

            CRM V2

            + + + + + +
            + +
            +
            + + + + +
            + + +
            +

            + WPCrmUser + + +
            + in package + +
            + + + implements + JsonSerializable + +

            + + + +

            Class de gestion des users en session avec Wordpress (ce truc immonde)

            + +

            @property string $uuidToken — A local transaction token for this user

            +
            + + +
            + Tags + +
            +
            +
            + category +
            +
            + +

            API

            +
            + +
            +
            + subpackage +
            +
            + +

            Wordpress

            +
            + +
            +
            + author +
            +
            + +

            Jérémy Munsch jeremy.munsch@ldc.fr

            +
            + +
            +
            + license +
            +
            + +

            MIT https://opensource.org/licenses/MIT

            +
            + +
            +
            + link +
            +
            + / + +
            +
            + + + + +

            + Interfaces, Classes and Traits + +

            + +
            +
            JsonSerializable
            +
            + + +
            + + +

            + Table of Contents + +

            + +
            +
            + $address + +  : string +
            +
            + +
            + $address2 + +  : string +
            +
            + +
            + $birth_date + +  : string +
            +
            + +
            + $city + +  : string +
            +
            + +
            + $country + +  : Country +
            +
            + +
            + $email + +  : string +
            +
            + +
            + $firstname + +  : string +
            +
            + +
            + $hashcode + +  : string +
            +
            + +
            + $last_connection + +  : string +
            +
            + +
            + $lastname + +  : string +
            +
            + +
            + $opt_in + +  : bool +
            +
            + +
            + $password + +  : string +
            +
            + +
            + $phone + +  : string +
            +
            + +
            + $postcode + +  : string +
            +
            + +
            + $status + +  : bool +
            +
            + +
            + $info + +  : Customer +
            +
            The CRM customer info (the api response)
            + +
            + $pemail + +  : string +
            +
            The CRM customer email
            + +
            + $phashcode + +  : string +
            +
            The CRM hashcode (UUID)
            + +
            + $uuidToken + +  : string +
            +
            The CRM customer temp uuidToken to validate transactions
            + +
            + __construct() + +  : mixed +
            +
            WPCrmUser construct
            + +
            + __get() + +  : bool|string|Country +
            +
            Magic getter
            + +
            + __set() + +  : bool|string|Country +
            +
            Magic setter
            + +
            + activate() + +  : bool +
            +
            Activate the account in the crm
            + +
            + delete() + +  : bool +
            +
            Delete current customer to +the local database and on crm
            + +
            + jsonSerialize() + +  : array<string|int, mixed> +
            +
            Serialize this object to an array
            + +
            + parseFromJson() + +  : WPCrmUser +
            +
            Generate a user from session data
            + +
            + save() + +  : bool +
            +
            Save current customer to +the local database and on crm
            + +
            + setInfo() + +  : void +
            +
            Set the customer info +with api response
            + +
            + toggleOptin() + +  : bool +
            +
            Toggle the current user optin value +on the current user and the crm
            + +
            + + + + + + +
            +

            + Properties + +

            +
            +

            + $address + + + +

            + + + + + public + string + $address + + +

            The account address (street number, name, build, flat number)

            +
            + +
            + + + +
            +
            +

            + $address2 + + + +

            + + + + + public + string + $address2 + + +

            — The account phone (address complement)

            +
            + +
            + + + +
            +
            +

            + $birth_date + + + +

            + + + + + public + string + $birth_date + + +

            — The account birth date 'yyyy-mm-dd'

            +
            + +
            + + + +
            +
            +

            + $city + + + +

            + + + + + public + string + $city + + +

            — The account city name

            +
            + +
            + + + +
            +
            +

            + $country + + + +

            + + + + + public + Country + $country + + +

            — The account country residence

            +
            + +
            + + + +
            +
            +

            + $email + + + +

            + + + + + public + string + $email + + +

            — Must be a rfc valid email on a valid domain name

            +
            + +
            + + + +
            +
            +

            + $firstname + + + +

            + + + + + public + string + $firstname + + +

            — The account first name

            +
            + +
            + + + +
            +
            +

            + $hashcode + + + +

            + + + + + public + string + $hashcode + + +

            — The crm hashcode this is a readonly field

            +
            + +
            + + + +
            +
            +

            + $last_connection + + + +

            + + + + + public + string + $last_connection + + +

            the last time user was connected 'yyyy-mm-dd HH:ii:ss'

            +
            + +
            + + + +
            +
            +

            + $lastname + + + +

            + + + + + public + string + $lastname + + +

            — The account last name

            +
            + +
            + + + +
            +
            +

            + $opt_in + + + +

            + + + + + public + bool + $opt_in + + +

            — true if the account is opt in

            +
            + +
            + + + +
            +
            +

            + $password + + + +

            + + + + + public + string + $password + + +

            Required only on create, +must have upper and lowers chars, +at least 1 number, +at leat 1 upper char, +at least 1 lower char and +at leat 1 special char

            +
            + +
            + + + +
            +
            +

            + $phone + + + +

            + + + + + public + string + $phone + + +

            — The account phone

            +
            + +
            + + + +
            +
            +

            + $postcode + + + +

            + + + + + public + string + $postcode + + +

            — The account city postcode

            +
            + +
            + + + +
            +
            +

            + $status + + + +

            + + + + + public + bool + $status + + +

            — true if the account is activated

            +
            + +
            + + + +
            +
            +

            + $info + + + +

            + + +

            The CRM customer info (the api response)

            + + + protected + Customer + $info + = null + + + + + +
            +
            +

            + $pemail + + + +

            + + +

            The CRM customer email

            + + + protected + string + $pemail + = null + + + + + +
            +
            +

            + $phashcode + + + +

            + + +

            The CRM hashcode (UUID)

            + + + protected + string + $phashcode + = null + + + + + +
            +
            +

            + $uuidToken + + + +

            + + +

            The CRM customer temp uuidToken to validate transactions

            + + + protected + string + $uuidToken + = null + + +

            UUID

            +
            + + + +
            +
            + +
            +

            + Methods + +

            +
            +

            + __construct() + +

            + + +

            WPCrmUser construct

            + + + public + __construct([string $hashcode = null ][, string $email = null ]) : mixed + + +
            Parameters
            +
            +
            + $hashcode + : string + = null
            +
            +

            The customer hashcode (UUID)

            +
            + +
            +
            + $email + : string + = null
            +
            +

            The customer email

            +
            + +
            +
            + + + +
            Return values
            + mixed + — + + +
            +
            +

            + __get() + +

            + + +

            Magic getter

            + + + public + __get(string $prop) : bool|string|Country + + +
            Parameters
            +
            +
            + $prop + : string +
            +
            +

            The prop to get

            +
            + +
            +
            + + + +
            Return values
            + bool|string|Country + — + + +
            +
            +

            + __set() + +

            + + +

            Magic setter

            + + + public + __set(string $prop, mixed $value) : bool|string|Country + + +
            Parameters
            +
            +
            + $prop + : string +
            +
            +

            The prop to get

            +
            + +
            +
            + $value + : mixed +
            +
            +
            + +
            +
            + + + +
            Return values
            + bool|string|Country + — + + +
            +
            +

            + activate() + +

            + + +

            Activate the account in the crm

            + + + public + activate() : bool + + + + + +
            Return values
            + bool + — +

            true if succeeded

            +
            + + +
            +
            +

            + delete() + +

            + + +

            Delete current customer to +the local database and on crm

            + + + public + delete() : bool + + + + + +
            Return values
            + bool + — +

            true if the operation succeeded false otherwise

            +
            + + +
            +
            +

            + jsonSerialize() + +

            + + +

            Serialize this object to an array

            + + + public + jsonSerialize() : array<string|int, mixed> + + + + + +
            Return values
            + array<string|int, mixed> + — + + +
            +
            +

            + parseFromJson() + +

            + + +

            Generate a user from session data

            + + + public + static parseFromJson(string $string) : WPCrmUser + + +
            Parameters
            +
            +
            + $string + : string +
            +
            +

            The json data stored in session

            +
            + +
            +
            + + + +
            Return values
            + WPCrmUser + — + + +
            +
            +

            + save() + +

            + + +

            Save current customer to +the local database and on crm

            + + + public + save() : bool + + + + +
            + Tags + +
            +
            +
            + throws +
            +
            + ApiErrorException + +

            with \LDC\LDCCRM\Enums\ApiError::customerExists()

            +
            + +
            +
            + +
            Return values
            + bool + — +

            true if the operation succeeded false otherwise

            +
            + + +
            +
            +

            + setInfo() + +

            + + +

            Set the customer info +with api response

            + + + public + setInfo(Customer $customer) : void + + +
            Parameters
            +
            +
            + $customer + : Customer +
            +
            +

            The Api object reponse (user)

            +
            + +
            +
            + + + +
            Return values
            + void + — + + +
            +
            +

            + toggleOptin() + +

            + + +

            Toggle the current user optin value +on the current user and the crm

            + + + public + toggleOptin() : bool + + + + +
            + Tags + +
            +
            +
            + throws +
            +
            + ApiErrorException + +

            with \LDC\LDCCRM\Enums\ApiError::singleOptinCustomerExists()

            +
            + +
            +
            + +
            Return values
            + bool + — +

            true if the operation succeeded

            +
            + + +
            +
            + + + + +
            +
            +
            +
            +

            Search results

            + +
            +
            +
              +
              +
              +
              +
              +
              + + +
              + + + + + + + + diff --git a/documentation/files/examples-customerexample.html b/documentation/files/examples-customerexample.html index 2f66a7c..7bb0da2 100644 --- a/documentation/files/examples-customerexample.html +++ b/documentation/files/examples-customerexample.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-crmapiv2.html b/documentation/files/src-crmapiv2.html index b910eb5..9e3241b 100644 --- a/documentation/files/src-crmapiv2.html +++ b/documentation/files/src-crmapiv2.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-apierror.html b/documentation/files/src-enums-apierror.html index fc4ccd7..2ac8a83 100644 --- a/documentation/files/src-enums-apierror.html +++ b/documentation/files/src-enums-apierror.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-apistatus.html b/documentation/files/src-enums-apistatus.html index 25c9d90..bcd330c 100644 --- a/documentation/files/src-enums-apistatus.html +++ b/documentation/files/src-enums-apistatus.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-arcadiamailtype.html b/documentation/files/src-enums-arcadiamailtype.html index 16ef580..62f8966 100644 --- a/documentation/files/src-enums-arcadiamailtype.html +++ b/documentation/files/src-enums-arcadiamailtype.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-arcadiaordertype.html b/documentation/files/src-enums-arcadiaordertype.html index 522525c..62c8d5b 100644 --- a/documentation/files/src-enums-arcadiaordertype.html +++ b/documentation/files/src-enums-arcadiaordertype.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-country.html b/documentation/files/src-enums-country.html index f0fe361..d2050f9 100644 --- a/documentation/files/src-enums-country.html +++ b/documentation/files/src-enums-country.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-httpmethods.html b/documentation/files/src-enums-httpmethods.html index 6bd024a..92d2516 100644 --- a/documentation/files/src-enums-httpmethods.html +++ b/documentation/files/src-enums-httpmethods.html @@ -70,7 +70,9 @@
            • models
            • transport
            • utilities
            • +
            • Wordpress
            • +

              None

              diff --git a/documentation/files/src-enums-loglevel.html b/documentation/files/src-enums-loglevel.html new file mode 100644 index 0000000..8834ad0 --- /dev/null +++ b/documentation/files/src-enums-loglevel.html @@ -0,0 +1,151 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
              +

              CRM V2

              + + + + + +
              + +
              +
              + + + + +
              +
                +
              + +
              +

              LogLevel.php

              + + +
              + + + + + + +

              + Interfaces, Classes and Traits + +

              + +
              + +
              LogLevel
              +
              + +
              + + + + + + + + +
              +
              +
              +
              +

              Search results

              + +
              +
              +
                +
                +
                +
                +
                +
                + + +
                + + + + + + + + diff --git a/documentation/files/src-enums-questiontype.html b/documentation/files/src-enums-questiontype.html index 0ef4596..0a94cc6 100644 --- a/documentation/files/src-enums-questiontype.html +++ b/documentation/files/src-enums-questiontype.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-exceptions-apierrorexception.html b/documentation/files/src-exceptions-apierrorexception.html index 46d6abb..549805d 100644 --- a/documentation/files/src-exceptions-apierrorexception.html +++ b/documentation/files/src-exceptions-apierrorexception.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-exceptions-crmexception.html b/documentation/files/src-exceptions-crmexception.html index 2b75494..d83c57f 100644 --- a/documentation/files/src-exceptions-crmexception.html +++ b/documentation/files/src-exceptions-crmexception.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-exceptions-loginexception.html b/documentation/files/src-exceptions-loginexception.html index 161a030..a8a7112 100644 --- a/documentation/files/src-exceptions-loginexception.html +++ b/documentation/files/src-exceptions-loginexception.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-exceptions-validationexception.html b/documentation/files/src-exceptions-validationexception.html index 1813a52..3b7a967 100644 --- a/documentation/files/src-exceptions-validationexception.html +++ b/documentation/files/src-exceptions-validationexception.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-answer.html b/documentation/files/src-models-answer.html index 8033908..3ef11b1 100644 --- a/documentation/files/src-models-answer.html +++ b/documentation/files/src-models-answer.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-arcadiamaildefault.html b/documentation/files/src-models-arcadiamaildefault.html index 6b2ae83..da2f75e 100644 --- a/documentation/files/src-models-arcadiamaildefault.html +++ b/documentation/files/src-models-arcadiamaildefault.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-arcadiamailgame.html b/documentation/files/src-models-arcadiamailgame.html index ef366fb..1a1c378 100644 --- a/documentation/files/src-models-arcadiamailgame.html +++ b/documentation/files/src-models-arcadiamailgame.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-crmclientmodel.html b/documentation/files/src-models-crmclientmodel.html index 704f62f..612a8b5 100644 --- a/documentation/files/src-models-crmclientmodel.html +++ b/documentation/files/src-models-crmclientmodel.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-customer.html b/documentation/files/src-models-customer.html index 67e61df..12a8e23 100644 --- a/documentation/files/src-models-customer.html +++ b/documentation/files/src-models-customer.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-question.html b/documentation/files/src-models-question.html index 80f6f67..1fa880c 100644 --- a/documentation/files/src-models-question.html +++ b/documentation/files/src-models-question.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-models-singleoptin.html b/documentation/files/src-models-singleoptin.html index a2bc60d..84871a7 100644 --- a/documentation/files/src-models-singleoptin.html +++ b/documentation/files/src-models-singleoptin.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-providers-crmclientv2provider.html b/documentation/files/src-providers-crmclientv2provider.html index 276a71f..0afaae2 100644 --- a/documentation/files/src-providers-crmclientv2provider.html +++ b/documentation/files/src-providers-crmclientv2provider.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-transport-apiinterface.html b/documentation/files/src-transport-apiinterface.html index ec7b867..3dff3ea 100644 --- a/documentation/files/src-transport-apiinterface.html +++ b/documentation/files/src-transport-apiinterface.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-transport-request.html b/documentation/files/src-transport-request.html index a186c66..013412c 100644 --- a/documentation/files/src-transport-request.html +++ b/documentation/files/src-transport-request.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-transport-response.html b/documentation/files/src-transport-response.html index d1edff9..f261368 100644 --- a/documentation/files/src-transport-response.html +++ b/documentation/files/src-transport-response.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-utils.html b/documentation/files/src-utils.html index 723c9fa..4d0ea3b 100644 --- a/documentation/files/src-utils.html +++ b/documentation/files/src-utils.html @@ -70,7 +70,9 @@
              • models
              • transport
              • utilities
              • +
              • Wordpress
              • +

                None

                diff --git a/documentation/files/src-wordpress-wpcrm.html b/documentation/files/src-wordpress-wpcrm.html new file mode 100644 index 0000000..031f504 --- /dev/null +++ b/documentation/files/src-wordpress-wpcrm.html @@ -0,0 +1,191 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                +

                CRM V2

                + + + + + +
                + +
                +
                + + + + +
                +
                  +
                + +
                +

                WPCrm.php

                + +

                LDCCRM For Wordpress usage

                + + + +
                + Tags + +
                +
                +
                + category +
                +
                + +

                API

                +
                + +
                +
                + author +
                +
                + +

                Jérémy Munsch jeremy.munsch@ldc.fr

                +
                + +
                +
                + license +
                +
                + +

                MIT https://opensource.org/licenses/MIT

                +
                + +
                +
                + link +
                +
                + / + +
                +
                + + + + +

                + Interfaces, Classes and Traits + +

                + +
                + +
                WPCrm
                +
                Class de gestion des users en session avec Wordpress (ce truc immonde)
                + +
                + + + + + + + + +
                +
                +
                +
                +

                Search results

                + +
                +
                +
                  +
                  +
                  +
                  +
                  +
                  + + +
                  + + + + + + + + diff --git a/documentation/files/src-wordpress-wpcrmanswer.html b/documentation/files/src-wordpress-wpcrmanswer.html new file mode 100644 index 0000000..7bb8cd6 --- /dev/null +++ b/documentation/files/src-wordpress-wpcrmanswer.html @@ -0,0 +1,191 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                  +

                  CRM V2

                  + + + + + +
                  + +
                  +
                  + + + + +
                  +
                    +
                  + +
                  +

                  WPCrmAnswer.php

                  + +

                  LDCCRM For Wordpress usage

                  + + + +
                  + Tags + +
                  +
                  +
                  + category +
                  +
                  + +

                  API

                  +
                  + +
                  +
                  + author +
                  +
                  + +

                  Jérémy Munsch jeremy.munsch@ldc.fr

                  +
                  + +
                  +
                  + license +
                  +
                  + +

                  MIT https://opensource.org/licenses/MIT

                  +
                  + +
                  +
                  + link +
                  +
                  + / + +
                  +
                  + + + + +

                  + Interfaces, Classes and Traits + +

                  + +
                  + +
                  WPCrmAnswer
                  +
                  Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                  + +
                  + + + + + + + + +
                  +
                  +
                  +
                  +

                  Search results

                  + +
                  +
                  +
                    +
                    +
                    +
                    +
                    +
                    + + +
                    + + + + + + + + diff --git a/documentation/files/src-wordpress-wpcrmquestion.html b/documentation/files/src-wordpress-wpcrmquestion.html new file mode 100644 index 0000000..92c554a --- /dev/null +++ b/documentation/files/src-wordpress-wpcrmquestion.html @@ -0,0 +1,191 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                    +

                    CRM V2

                    + + + + + +
                    + +
                    +
                    + + + + +
                    +
                      +
                    + +
                    +

                    WPCrmQuestion.php

                    + +

                    LDCCRM For Wordpress usage

                    + + + +
                    + Tags + +
                    +
                    +
                    + category +
                    +
                    + +

                    API

                    +
                    + +
                    +
                    + author +
                    +
                    + +

                    Jérémy Munsch jeremy.munsch@ldc.fr

                    +
                    + +
                    +
                    + license +
                    +
                    + +

                    MIT https://opensource.org/licenses/MIT

                    +
                    + +
                    +
                    + link +
                    +
                    + / + +
                    +
                    + + + + +

                    + Interfaces, Classes and Traits + +

                    + +
                    + +
                    WPCrmQuestion
                    +
                    Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                    + +
                    + + + + + + + + +
                    +
                    +
                    +
                    +

                    Search results

                    + +
                    +
                    +
                      +
                      +
                      +
                      +
                      +
                      + + +
                      + + + + + + + + diff --git a/documentation/files/src-wordpress-wpcrmuser.html b/documentation/files/src-wordpress-wpcrmuser.html new file mode 100644 index 0000000..bc4a864 --- /dev/null +++ b/documentation/files/src-wordpress-wpcrmuser.html @@ -0,0 +1,191 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                      +

                      CRM V2

                      + + + + + +
                      + +
                      +
                      + + + + +
                      +
                        +
                      + +
                      +

                      WPCrmUser.php

                      + +

                      LDCCRM For Wordpress usage

                      + + + +
                      + Tags + +
                      +
                      +
                      + category +
                      +
                      + +

                      API

                      +
                      + +
                      +
                      + author +
                      +
                      + +

                      Jérémy Munsch jeremy.munsch@ldc.fr

                      +
                      + +
                      +
                      + license +
                      +
                      + +

                      MIT https://opensource.org/licenses/MIT

                      +
                      + +
                      +
                      + link +
                      +
                      + / + +
                      +
                      + + + + +

                      + Interfaces, Classes and Traits + +

                      + +
                      + +
                      WPCrmUser
                      +
                      Class de gestion des users en session avec Wordpress (ce truc immonde)
                      + +
                      + + + + + + + + +
                      +
                      +
                      +
                      +

                      Search results

                      + +
                      +
                      +
                        +
                        +
                        +
                        +
                        +
                        + + +
                        + + + + + + + + diff --git a/documentation/graphs/classes.html b/documentation/graphs/classes.html index 5a095b8..9d638db 100644 --- a/documentation/graphs/classes.html +++ b/documentation/graphs/classes.html @@ -59,7 +59,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        diff --git a/documentation/index.html b/documentation/index.html index 02b8528..c2a146c 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        @@ -97,6 +99,7 @@
                        LDCCrmClient
                        +
                        None

                        diff --git a/documentation/indices/files.html b/documentation/indices/files.html index db0b8b9..81d1598 100644 --- a/documentation/indices/files.html +++ b/documentation/indices/files.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        @@ -117,6 +119,7 @@

                        L

                        Q

                        @@ -141,7 +144,14 @@ -
                        +

                        W

                        + +

                        Search results

                        diff --git a/documentation/js/searchIndex.js b/documentation/js/searchIndex.js index 7e5219d..b9bbef0 100644 --- a/documentation/js/searchIndex.js +++ b/documentation/js/searchIndex.js @@ -35,6 +35,11 @@ Search.appendIndex( "name": "setStatus", "summary": "Set\u0020the\u0020single\u0020optin\u0020status\u0020for\u0020an\u0020email", "url": "classes/LDC-LDCCRM-CrmApiV2.html#method_setStatus" + }, { + "fqsen": "\\LDC\\LDCCRM\\CrmApiV2\u003A\u003Alogin\u0028\u0029", + "name": "login", + "summary": "Test\u0020a\u0020customer\u0020credentials\u0020to\u0020see\u0020if\u0020it\u0020can\u0020login", + "url": "classes/LDC-LDCCRM-CrmApiV2.html#method_login" }, { "fqsen": "\\LDC\\LDCCRM\\CrmApiV2\u003A\u003A\u0024apiInterface", "name": "apiInterface", @@ -95,6 +100,26 @@ Search.appendIndex( "name": "labels", "summary": "", "url": "classes/LDC-LDCCRM-Enums-Country.html#method_labels" + }, { + "fqsen": "\\LDC\\LDCCRM\\Enums\\LogLevel", + "name": "LogLevel", + "summary": "", + "url": "classes/LDC-LDCCRM-Enums-LogLevel.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\Enums\\LogLevel\u003A\u003Avalues\u0028\u0029", + "name": "values", + "summary": "", + "url": "classes/LDC-LDCCRM-Enums-LogLevel.html#method_values" + }, { + "fqsen": "\\LDC\\LDCCRM\\Enums\\QuestionType", + "name": "QuestionType", + "summary": "", + "url": "classes/LDC-LDCCRM-Enums-QuestionType.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\Enums\\QuestionType\u003A\u003Avalues\u0028\u0029", + "name": "values", + "summary": "", + "url": "classes/LDC-LDCCRM-Enums-QuestionType.html#method_values" }, { "fqsen": "\\LDC\\LDCCRM\\Exceptions\\ApiErrorException", "name": "ApiErrorException", @@ -165,6 +190,51 @@ Search.appendIndex( "name": "report", "summary": "", "url": "classes/LDC-LDCCRM-Exceptions-ValidationException.html#method_report" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer", + "name": "Answer", + "summary": "This\u0020class\u0020represents\u0020an\u0020answer\nIt\u0020has\u0020a\u0020method\u0020to\u0020submit\u0020answers", + "url": "classes/LDC-LDCCRM-Models-Answer.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "", + "url": "classes/LDC-LDCCRM-Models-Answer.html#method___construct" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003AsetQuestionAnswers\u0028\u0029", + "name": "setQuestionAnswers", + "summary": "Set\u0020unanswered\u0020question\u0020for\u0020a\u0020specific\u0020customer", + "url": "classes/LDC-LDCCRM-Models-Answer.html#method_setQuestionAnswers" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-Models-Answer.html#method_jsonSerialize" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024isNew", + "name": "isNew", + "summary": "Is\u0020true\u0020if\u0020this\u0020model\u0020was\u0020not\u0020filled\u0020from\u0020crm", + "url": "classes/LDC-LDCCRM-Models-Answer.html#property_isNew" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024id", + "name": "id", + "summary": "The\u0020question\u0020id", + "url": "classes/LDC-LDCCRM-Models-Answer.html#property_id" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024answer", + "name": "answer", + "summary": "The\u0020actual\u0020answer\u0020as\u0020a\u0020string", + "url": "classes/LDC-LDCCRM-Models-Answer.html#property_answer" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024modelFields", + "name": "modelFields", + "summary": "The\u0020crm\u0020customer\u0020fields", + "url": "classes/LDC-LDCCRM-Models-Answer.html#property_modelFields" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024validation", + "name": "validation", + "summary": "Validation\u0020rules", + "url": "classes/LDC-LDCCRM-Models-Answer.html#property_validation" }, { "fqsen": "\\LDC\\LDCCRM\\Models\\ArcadiaMailDefault", "name": "ArcadiaMailDefault", @@ -200,6 +270,11 @@ Search.appendIndex( "name": "send", "summary": "Send\u0020The\u0020actual\u0020mail", "url": "classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html#method_send" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\ArcadiaMailDefault\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-Models-ArcadiaMailDefault.html#method_jsonSerialize" }, { "fqsen": "\\LDC\\LDCCRM\\Models\\ArcadiaMailDefault\u003A\u003A\u0024operation", "name": "operation", @@ -265,6 +340,11 @@ Search.appendIndex( "name": "send", "summary": "Send\u0020The\u0020actual\u0020mail", "url": "classes/LDC-LDCCRM-Models-ArcadiaMailGame.html#method_send" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\ArcadiaMailGame\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-Models-ArcadiaMailGame.html#method_jsonSerialize" }, { "fqsen": "\\LDC\\LDCCRM\\Models\\ArcadiaMailGame\u003A\u003A\u0024operation", "name": "operation", @@ -375,6 +455,16 @@ Search.appendIndex( "name": "toggleOptin", "summary": "Toggle\u0020the\u0020account\u0020optin\u0020value\u0020in\u0020the\u0020crm", "url": "classes/LDC-LDCCRM-Models-Customer.html#method_toggleOptin" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Customer\u003A\u003Alogin\u0028\u0029", + "name": "login", + "summary": "Test\u0020customer\u0020credentials", + "url": "classes/LDC-LDCCRM-Models-Customer.html#method_login" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Customer\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-Models-Customer.html#method_jsonSerialize" }, { "fqsen": "\\LDC\\LDCCRM\\Models\\Customer\u003A\u003A\u0024isNew", "name": "isNew", @@ -470,6 +560,91 @@ Search.appendIndex( "name": "validation", "summary": "Validation\u0020rules", "url": "classes/LDC-LDCCRM-Models-Customer.html#property_validation" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question", + "name": "Question", + "summary": "This\u0020class\u0020represents\u0020a\u0020question\nIt\u0020has\u0020some\u0020static\u0020methods\u0020to\u0020retrieve\u0020questions\u0020and\u0020answers", + "url": "classes/LDC-LDCCRM-Models-Question.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "", + "url": "classes/LDC-LDCCRM-Models-Question.html#method___construct" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__get\u0028\u0029", + "name": "__get", + "summary": "", + "url": "classes/LDC-LDCCRM-Models-Question.html#method___get" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__set\u0028\u0029", + "name": "__set", + "summary": "Set\u0020prop", + "url": "classes/LDC-LDCCRM-Models-Question.html#method___set" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003Afill\u0028\u0029", + "name": "fill", + "summary": "Fill\u0020data\u0020into\u0020this\u0020model\nusing\u0020validation\u0020rules", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_fill" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AvalidateAllValues\u0028\u0029", + "name": "validateAllValues", + "summary": "Validate\u0020all\u0020model\u0020properties", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_validateAllValues" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003Aall\u0028\u0029", + "name": "all", + "summary": "Get\u0020all\u0020questions\u0020only", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_all" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AallWithCustomerAnswers\u0028\u0029", + "name": "allWithCustomerAnswers", + "summary": "Get\u0020all\u0020the\u0020questions\u0020with\u0020customer\u0020answers", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_allWithCustomerAnswers" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AunansweredBy\u0028\u0029", + "name": "unansweredBy", + "summary": "Get\u0020unanswered\u0020question\u0020for\u0020a\u0020specific\u0020customer", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_unansweredBy" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-Models-Question.html#method_jsonSerialize" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024isNew", + "name": "isNew", + "summary": "Is\u0020true\u0020if\u0020this\u0020model\u0020was\u0020not\u0020filled\u0020from\u0020crm", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_isNew" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024id", + "name": "id", + "summary": "The\u0020question\u0020id", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_id" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024question", + "name": "question", + "summary": "The\u0020actual\u0020question\u0020as\u0020a\u0020string", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_question" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024type", + "name": "type", + "summary": "The\u0020question\u0020type", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_type" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024answers", + "name": "answers", + "summary": "The\u0020question\u0020answers", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_answers" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024modelFields", + "name": "modelFields", + "summary": "The\u0020crm\u0020customer\u0020fields", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_modelFields" + }, { + "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024validation", + "name": "validation", + "summary": "Validation\u0020rules", + "url": "classes/LDC-LDCCRM-Models-Question.html#property_validation" }, { "fqsen": "\\LDC\\LDCCRM\\Models\\SingleOptin", "name": "SingleOptin", @@ -680,6 +855,16 @@ Search.appendIndex( "name": "getPackageInfo", "summary": "Get\u0020composer.json\u0020infos", "url": "classes/LDC-LDCCRM-Utils.html#method_getPackageInfo" + }, { + "fqsen": "\\LDC\\LDCCRM\\Utils\u003A\u003Atranslate\u0028\u0029", + "name": "translate", + "summary": "Translation\u0020a\u0020string\u0020using\u0020php\u0020file\u0020lang", + "url": "classes/LDC-LDCCRM-Utils.html#method_translate" + }, { + "fqsen": "\\LDC\\LDCCRM\\Utils\u003A\u003Alog\u0028\u0029", + "name": "log", + "summary": "Write\u0020log\u0020using\u0020syslog\nIt\u0020also\u0020write\u0020log\u0020using\u0020\\Illuminate\\Support\\Facades\\Log\nif\u0020it\u0020is\u0020present", + "url": "classes/LDC-LDCCRM-Utils.html#method_log" }, { "fqsen": "\\LDC\\LDCCRM\\Utils\u003A\u003A\u0024packageInfos", "name": "packageInfos", @@ -691,135 +876,295 @@ Search.appendIndex( "summary": "The\u0020env\u0020config", "url": "classes/LDC-LDCCRM-Utils.html#property_config" }, { - "fqsen": "\\LDC\\LDCCRM\\Enums\\QuestionType", - "name": "QuestionType", + "fqsen": "\\LDC\\LDCCRM\\Utils\u003A\u003A\u0024translations", + "name": "translations", + "summary": "Loaded\u0020translations", + "url": "classes/LDC-LDCCRM-Utils.html#property_translations" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm", + "name": "WPCrm", + "summary": "Class\u0020de\u0020gestion\u0020des\u0020users\u0020en\u0020session\u0020avec\u0020Wordpress\u0020\u0028ce\u0020truc\u0020immonde\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003Alogin\u0028\u0029", + "name": "login", + "summary": "Try\u0020to\u0020login\u0020with\u0020CRM\u0020API\nreturn\u0020api\u0020response\u0020code\u0020if\u0020an\u0020error\u0020occurs", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_login" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AforceLogin\u0028\u0029", + "name": "forceLogin", + "summary": "Login\u0020user\u0020by\u0020setting\u0020user\u0020session", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_forceLogin" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetUser\u0028\u0029", + "name": "getUser", + "summary": "Get\u0020the\u0020current\u0020user\nreturn\u0020null\u0020if\u0020the\u0020user\u0020is\u0020not\u0020logged\u0020in", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetUserFromApi\u0028\u0029", + "name": "getUserFromApi", + "summary": "Get\u0020the\u0020current\u0020user\nreturn\u0020api\u0020response\u0020code\u0020if\u0020an\u0020error\u0020occurs", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getUserFromApi" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AloginUserWithApi\u0028\u0029", + "name": "loginUserWithApi", + "summary": "Get\u0020the\u0020current\u0020user\nreturn\u0020null\u0020if\u0020the\u0020user\u0020is\u0020not\u0020logged\u0020in", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_loginUserWithApi" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003Alogout\u0028\u0029", + "name": "logout", + "summary": "Destroy\u0020the\u0020customer\u0020from\u0020session\nand\u0020therefore\u0020logout", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_logout" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003Acheck\u0028\u0029", + "name": "check", + "summary": "Check\u0020if\u0020the\u0020user\u0020is\u0020Authenticated", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_check" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsaveUser\u0028\u0029", + "name": "saveUser", + "summary": "Save\u0020current\u0020customer\u0020to\nthe\u0020local\u0020database\u0020and\u0020on\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_saveUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AdeleteUser\u0028\u0029", + "name": "deleteUser", + "summary": "Delete\u0020current\u0020customer\u0020from\nthe\u0020local\u0020database\u0020and\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_deleteUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AtoggleUserOptin\u0028\u0029", + "name": "toggleUserOptin", + "summary": "Toggle\u0020the\u0020current\u0020user\u0020optin\u0020value\non\u0020the\u0020current\u0020user\u0020and\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_toggleUserOptin" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsetSingleOptin\u0028\u0029", + "name": "setSingleOptin", + "summary": "Set\u0020the\u0020single\u0020optin\u0020status\u0020for\u0020an\u0020email\non\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_setSingleOptin" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsendArcadiaMailDefault\u0028\u0029", + "name": "sendArcadiaMailDefault", + "summary": "send\u0020An\u0020arcadia\u0020mail\u0020with\u0020type\u0020default\nThis\u0020methods\u0020requires\u0020to\u0020have\u0020a\u0020user\u0020in\u0020session\u0020\u0028to\u0020be\u0020logged\u0020in\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_sendArcadiaMailDefault" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsendArcadiaMailGame\u0028\u0029", + "name": "sendArcadiaMailGame", + "summary": "send\u0020An\u0020arcadia\u0020mail\u0020with\u0020type\u0020game\nThis\u0020methods\u0020requires\u0020to\u0020have\u0020a\u0020user\u0020in\u0020session\u0020\u0028to\u0020be\u0020logged\u0020in\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_sendArcadiaMailGame" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AactivateUser\u0028\u0029", + "name": "activateUser", + "summary": "Toggle\u0020the\u0020current\u0020user\u0020optin\u0020value\non\u0020the\u0020current\u0020user\u0020and\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_activateUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetNewUser\u0028\u0029", + "name": "getNewUser", + "summary": "Generate\u0020a\u0020new\u0020user", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getNewUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AunsetActiveUser\u0028\u0029", + "name": "unsetActiveUser", + "summary": "Remove\u0020active\u0020user\nto\u0020prevent\u0020WPCrm\u003A\u003Acheck\u0020to\u0020return\u0020true", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_unsetActiveUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetCustomer\u0028\u0029", + "name": "getCustomer", + "summary": "Get\u0020all\u0020customer\u0020infos", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getCustomer" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsetUser\u0028\u0029", + "name": "setUser", + "summary": "Create\u0020a\u0020user\nstores\u0020it\u0020to\u0020the\u0020session\nand\u0020finally\u0020saves\u0020it\u0020to\u0020the\u0020database\u0020if\u0020it\u0020does\u0020not\u0020exists", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_setUser" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AinitLdcApi\u0028\u0029", + "name": "initLdcApi", + "summary": "Get\u0020the\u0020initialized\u0020API\u0020object", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_initLdcApi" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AmakeApiV2Call\u0028\u0029", + "name": "makeApiV2Call", + "summary": "Make\u0020a\u0020call\u0020using\u0020apiV2", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_makeApiV2Call" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AbootSessionIfNeeded\u0028\u0029", + "name": "bootSessionIfNeeded", + "summary": "Boot\u0020the\u0020php\u0020session\u0020if\u0020needed", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_bootSessionIfNeeded" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetUserFromTable\u0028\u0029", + "name": "getUserFromTable", + "summary": "Get\u0020a\u0020customer\u0020from\u0020table", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getUserFromTable" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetUserFromTableByEmail\u0028\u0029", + "name": "getUserFromTableByEmail", + "summary": "Get\u0020a\u0020customer\u0020from\u0020table\u0020by\u0020an\u0020email", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getUserFromTableByEmail" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetUserFromTableByUuid\u0028\u0029", + "name": "getUserFromTableByUuid", + "summary": "Get\u0020a\u0020customer\u0020from\u0020table\u0020by\u0020an\u0020email", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getUserFromTableByUuid" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AsaveOrUpdateUserToTable\u0028\u0029", + "name": "saveOrUpdateUserToTable", + "summary": "Save\u0020or\u0020update\u0020the\u0020user\u0020to\u0020the\u0020table", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_saveOrUpdateUserToTable" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AdeleteUserFromTable\u0028\u0029", + "name": "deleteUserFromTable", + "summary": "Save\u0020or\u0020update\u0020the\u0020user\u0020to\u0020the\u0020table", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_deleteUserFromTable" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003Aquery\u0028\u0029", + "name": "query", + "summary": "Query\u0020in\u0020DB", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_query" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetWpDb\u0028\u0029", + "name": "getWpDb", + "summary": "Get\u0020WP\u0020\u0027pdo\u0020instance\u0027", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getWpDb" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003AgetRawProperty\u0028\u0029", + "name": "getRawProperty", + "summary": "Get\u0020a\u0020property", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#method_getRawProperty" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003A\u0024sessionKey", + "name": "sessionKey", "summary": "", - "url": "classes/LDC-LDCCRM-Enums-QuestionType.html" + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#property_sessionKey" }, { - "fqsen": "\\LDC\\LDCCRM\\Enums\\QuestionType\u003A\u003Avalues\u0028\u0029", - "name": "values", + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003A\u0024sessionDestroyed", + "name": "sessionDestroyed", "summary": "", - "url": "classes/LDC-LDCCRM-Enums-QuestionType.html#method_values" + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#property_sessionDestroyed" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer", - "name": "Answer", - "summary": "This\u0020class\u0020represents\u0020an\u0020answer\nIt\u0020has\u0020a\u0020method\u0020to\u0020submit\u0020answers", - "url": "classes/LDC-LDCCRM-Models-Answer.html" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003A\u0024api", + "name": "api", + "summary": "The\u0020user\u0020object", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#property_api" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A__construct\u0028\u0029", - "name": "__construct", - "summary": "", - "url": "classes/LDC-LDCCRM-Models-Answer.html#method___construct" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrm\u003A\u003A\u0024user", + "name": "user", + "summary": "The\u0020user\u0020object", + "url": "classes/LDC-LDCCRM-WordPress-WPCrm.html#property_user" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003AsetQuestionAnswers\u0028\u0029", + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmAnswer", + "name": "WPCrmAnswer", + "summary": "Class\u0020de\u0020gestion\u0020de\u0020la\u0020segmentation\u0020question\u0020avec\u0020Wordpress\u0020\u0028ce\u0020truc\u0020immonde\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmAnswer\u003A\u003AsetQuestionAnswers\u0028\u0029", "name": "setQuestionAnswers", - "summary": "Get\u0020unanswered\u0020question\u0020for\u0020a\u0020specific\u0020customer", - "url": "classes/LDC-LDCCRM-Models-Answer.html#method_setQuestionAnswers" + "summary": "Set\u0020unanswered\u0020question\u0020for\u0020a\u0020specific\u0020customer", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html#method_setQuestionAnswers" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024isNew", - "name": "isNew", - "summary": "Is\u0020true\u0020if\u0020this\u0020model\u0020was\u0020not\u0020filled\u0020from\u0020crm", - "url": "classes/LDC-LDCCRM-Models-Answer.html#property_isNew" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmAnswer\u003A\u003AgetRawProperty\u0028\u0029", + "name": "getRawProperty", + "summary": "Get\u0020a\u0020property", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmAnswer.html#method_getRawProperty" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024id", - "name": "id", - "summary": "The\u0020question\u0020id", - "url": "classes/LDC-LDCCRM-Models-Answer.html#property_id" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmQuestion", + "name": "WPCrmQuestion", + "summary": "Class\u0020de\u0020gestion\u0020de\u0020la\u0020segmentation\u0020question\u0020avec\u0020Wordpress\u0020\u0028ce\u0020truc\u0020immonde\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024answer", - "name": "answer", - "summary": "The\u0020actual\u0020answer\u0020as\u0020a\u0020string", - "url": "classes/LDC-LDCCRM-Models-Answer.html#property_answer" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024modelFields", - "name": "modelFields", - "summary": "The\u0020crm\u0020customer\u0020fields", - "url": "classes/LDC-LDCCRM-Models-Answer.html#property_modelFields" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Answer\u003A\u003A\u0024validation", - "name": "validation", - "summary": "Validation\u0020rules", - "url": "classes/LDC-LDCCRM-Models-Answer.html#property_validation" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question", - "name": "Question", - "summary": "This\u0020class\u0020represents\u0020a\u0020question\nIt\u0020has\u0020some\u0020static\u0020methods\u0020to\u0020retrieve\u0020questions\u0020and\u0020answers", - "url": "classes/LDC-LDCCRM-Models-Question.html" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__construct\u0028\u0029", - "name": "__construct", - "summary": "", - "url": "classes/LDC-LDCCRM-Models-Question.html#method___construct" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__get\u0028\u0029", - "name": "__get", - "summary": "", - "url": "classes/LDC-LDCCRM-Models-Question.html#method___get" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A__set\u0028\u0029", - "name": "__set", - "summary": "Set\u0020prop", - "url": "classes/LDC-LDCCRM-Models-Question.html#method___set" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003Afill\u0028\u0029", - "name": "fill", - "summary": "Fill\u0020data\u0020into\u0020this\u0020model\nusing\u0020validation\u0020rules", - "url": "classes/LDC-LDCCRM-Models-Question.html#method_fill" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AvalidateAllValues\u0028\u0029", - "name": "validateAllValues", - "summary": "Validate\u0020all\u0020model\u0020properties", - "url": "classes/LDC-LDCCRM-Models-Question.html#method_validateAllValues" - }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003Aall\u0028\u0029", - "name": "all", + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmQuestion\u003A\u003AgetAll\u0028\u0029", + "name": "getAll", "summary": "Get\u0020all\u0020questions\u0020only", - "url": "classes/LDC-LDCCRM-Models-Question.html#method_all" + "url": "classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html#method_getAll" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AallWithCustomerAnswers\u0028\u0029", + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmQuestion\u003A\u003AallWithCustomerAnswers\u0028\u0029", "name": "allWithCustomerAnswers", - "summary": "Get\u0020all\u0020the\u0020questions\u0020with\u0020customer\u0020answers", - "url": "classes/LDC-LDCCRM-Models-Question.html#method_allWithCustomerAnswers" + "summary": "Get\u0020all\u0020the\u0020questions\u0020with\u0020user\u0020answers", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html#method_allWithCustomerAnswers" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003AunansweredBy\u0028\u0029", + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmQuestion\u003A\u003AunansweredBy\u0028\u0029", "name": "unansweredBy", "summary": "Get\u0020unanswered\u0020question\u0020for\u0020a\u0020specific\u0020customer", - "url": "classes/LDC-LDCCRM-Models-Question.html#method_unansweredBy" + "url": "classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html#method_unansweredBy" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024isNew", - "name": "isNew", - "summary": "Is\u0020true\u0020if\u0020this\u0020model\u0020was\u0020not\u0020filled\u0020from\u0020crm", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_isNew" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmQuestion\u003A\u003AgetRawProperty\u0028\u0029", + "name": "getRawProperty", + "summary": "Get\u0020a\u0020property", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmQuestion.html#method_getRawProperty" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024id", - "name": "id", - "summary": "The\u0020question\u0020id", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_id" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser", + "name": "WPCrmUser", + "summary": "Class\u0020de\u0020gestion\u0020des\u0020users\u0020en\u0020session\u0020avec\u0020Wordpress\u0020\u0028ce\u0020truc\u0020immonde\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024question", - "name": "question", - "summary": "The\u0020actual\u0020question\u0020as\u0020a\u0020string", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_question" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "WPCrmUser\u0020construct", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method___construct" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024type", - "name": "type", - "summary": "The\u0020question\u0020type", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_type" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A__get\u0028\u0029", + "name": "__get", + "summary": "Magic\u0020getter", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method___get" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024answers", - "name": "answers", - "summary": "The\u0020question\u0020answers", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_answers" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A__set\u0028\u0029", + "name": "__set", + "summary": "Magic\u0020setter", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method___set" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024modelFields", - "name": "modelFields", - "summary": "The\u0020crm\u0020customer\u0020fields", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_modelFields" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003AsetInfo\u0028\u0029", + "name": "setInfo", + "summary": "Set\u0020the\u0020customer\u0020info\nwith\u0020api\u0020response", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_setInfo" }, { - "fqsen": "\\LDC\\LDCCRM\\Models\\Question\u003A\u003A\u0024validation", - "name": "validation", - "summary": "Validation\u0020rules", - "url": "classes/LDC-LDCCRM-Models-Question.html#property_validation" + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003AparseFromJson\u0028\u0029", + "name": "parseFromJson", + "summary": "Generate\u0020a\u0020user\u0020from\u0020session\u0020data", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_parseFromJson" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003AjsonSerialize\u0028\u0029", + "name": "jsonSerialize", + "summary": "Serialize\u0020this\u0020object\u0020to\u0020an\u0020array", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_jsonSerialize" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003Asave\u0028\u0029", + "name": "save", + "summary": "Save\u0020current\u0020customer\u0020to\nthe\u0020local\u0020database\u0020and\u0020on\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_save" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003Adelete\u0028\u0029", + "name": "delete", + "summary": "Delete\u0020current\u0020customer\u0020to\nthe\u0020local\u0020database\u0020and\u0020on\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_delete" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003AtoggleOptin\u0028\u0029", + "name": "toggleOptin", + "summary": "Toggle\u0020the\u0020current\u0020user\u0020optin\u0020value\non\u0020the\u0020current\u0020user\u0020and\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_toggleOptin" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003Aactivate\u0028\u0029", + "name": "activate", + "summary": "Activate\u0020the\u0020account\u0020in\u0020the\u0020crm", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#method_activate" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A\u0024phashcode", + "name": "phashcode", + "summary": "The\u0020CRM\u0020hashcode\u0020\u0028UUID\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#property_phashcode" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A\u0024pemail", + "name": "pemail", + "summary": "The\u0020CRM\u0020customer\u0020email", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#property_pemail" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A\u0024info", + "name": "info", + "summary": "The\u0020CRM\u0020customer\u0020info\u0020\u0028the\u0020api\u0020response\u0029", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#property_info" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress\\WPCrmUser\u003A\u003A\u0024uuidToken", + "name": "uuidToken", + "summary": "The\u0020CRM\u0020customer\u0020temp\u0020uuidToken\u0020to\u0020validate\u0020transactions", + "url": "classes/LDC-LDCCRM-WordPress-WPCrmUser.html#property_uuidToken" }, { "fqsen": "\\", "name": "\\", @@ -860,5 +1205,10 @@ Search.appendIndex( "name": "Transport", "summary": "", "url": "namespaces/ldc-ldccrm-transport.html" + }, { + "fqsen": "\\LDC\\LDCCRM\\WordPress", + "name": "WordPress", + "summary": "", + "url": "namespaces/ldc-ldccrm-wordpress.html" } ] ); diff --git a/documentation/namespaces/default.html b/documentation/namespaces/default.html index 73bfbb2..2bf9621 100644 --- a/documentation/namespaces/default.html +++ b/documentation/namespaces/default.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        diff --git a/documentation/namespaces/ldc-ldccrm-enums.html b/documentation/namespaces/ldc-ldccrm-enums.html index 407f6c2..9d2d5a8 100644 --- a/documentation/namespaces/ldc-ldccrm-enums.html +++ b/documentation/namespaces/ldc-ldccrm-enums.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        @@ -114,6 +116,8 @@
                        Country
                        Liste de Pays
                        +
                        LogLevel
                        +
                        QuestionType
                        diff --git a/documentation/namespaces/ldc-ldccrm-exceptions.html b/documentation/namespaces/ldc-ldccrm-exceptions.html index 232c1f1..c5901be 100644 --- a/documentation/namespaces/ldc-ldccrm-exceptions.html +++ b/documentation/namespaces/ldc-ldccrm-exceptions.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        diff --git a/documentation/namespaces/ldc-ldccrm-models.html b/documentation/namespaces/ldc-ldccrm-models.html index e6e89ae..8f516df 100644 --- a/documentation/namespaces/ldc-ldccrm-models.html +++ b/documentation/namespaces/ldc-ldccrm-models.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        @@ -104,6 +106,9 @@
                        +
                        Answer
                        +
                        This class represents an answer +It has a method to submit answers
                        ArcadiaMailDefault
                        This class represents the customer info with the account validation status
                        @@ -114,14 +119,11 @@ the account validation status
                        This class represents the customer info with the account validation status. You can use it as a standalone class but beware of catching exceptions
                        -
                        SingleOptin
                        -
                        This class allows to handle single optins
                        -
                        Answer
                        -
                        This class represents an answer -It has a method to submit answers
                        Question
                        This class represents a question It has some static methods to retrieve questions and answers
                        +
                        SingleOptin
                        +
                        This class allows to handle single optins
                        diff --git a/documentation/namespaces/ldc-ldccrm-providers.html b/documentation/namespaces/ldc-ldccrm-providers.html index 4de1096..04b1320 100644 --- a/documentation/namespaces/ldc-ldccrm-providers.html +++ b/documentation/namespaces/ldc-ldccrm-providers.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        diff --git a/documentation/namespaces/ldc-ldccrm-transport.html b/documentation/namespaces/ldc-ldccrm-transport.html index e260018..ffd9cb5 100644 --- a/documentation/namespaces/ldc-ldccrm-transport.html +++ b/documentation/namespaces/ldc-ldccrm-transport.html @@ -70,7 +70,9 @@
                      • models
                      • transport
                      • utilities
                      • +
                      • Wordpress
                      • +

                        None

                        diff --git a/documentation/namespaces/ldc-ldccrm-wordpress.html b/documentation/namespaces/ldc-ldccrm-wordpress.html new file mode 100644 index 0000000..ac69193 --- /dev/null +++ b/documentation/namespaces/ldc-ldccrm-wordpress.html @@ -0,0 +1,151 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                        +

                        CRM V2

                        + + + + + +
                        + +
                        +
                        + + + + +
                        + + +
                        +

                        WordPress

                        + + + +

                        + Interfaces, Classes and Traits + +

                        + +
                        + +
                        WPCrm
                        +
                        Class de gestion des users en session avec Wordpress (ce truc immonde)
                        +
                        WPCrmAnswer
                        +
                        Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                        +
                        WPCrmQuestion
                        +
                        Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                        +
                        WPCrmUser
                        +
                        Class de gestion des users en session avec Wordpress (ce truc immonde)
                        + +
                        + + + + + + +
                        +
                        +
                        +
                        +

                        Search results

                        + +
                        +
                        +
                          +
                          +
                          +
                          +
                          +
                          + + +
                          + + + + + + + + diff --git a/documentation/namespaces/ldc-ldccrm.html b/documentation/namespaces/ldc-ldccrm.html index 33ab223..6bf56db 100644 --- a/documentation/namespaces/ldc-ldccrm.html +++ b/documentation/namespaces/ldc-ldccrm.html @@ -70,7 +70,9 @@
                        • models
                        • transport
                        • utilities
                        • +
                        • Wordpress
                        • +

                          None

                          @@ -106,6 +108,7 @@
                          Models
                          Providers
                          Transport
                          +
                          WordPress

                          diff --git a/documentation/namespaces/ldc.html b/documentation/namespaces/ldc.html index ef40e40..c8f2e29 100644 --- a/documentation/namespaces/ldc.html +++ b/documentation/namespaces/ldc.html @@ -70,7 +70,9 @@
                        • models
                        • transport
                        • utilities
                        • +
                        • Wordpress
                        • +

                          None

                          diff --git a/documentation/packages/LDCCrmClient-Wordpress.html b/documentation/packages/LDCCrmClient-Wordpress.html new file mode 100644 index 0000000..fbab47b --- /dev/null +++ b/documentation/packages/LDCCrmClient-Wordpress.html @@ -0,0 +1,150 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                          +

                          CRM V2

                          + + + + + +
                          + +
                          +
                          + + + + +
                          + + +
                          +

                          Wordpress

                          + + + +

                          + Interfaces, Classes and Traits + +

                          + +
                          + +
                          WPCrm
                          +
                          Class de gestion des users en session avec Wordpress (ce truc immonde)
                          +
                          WPCrmAnswer
                          +
                          Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                          +
                          WPCrmQuestion
                          +
                          Class de gestion de la segmentation question avec Wordpress (ce truc immonde)
                          +
                          WPCrmUser
                          +
                          Class de gestion des users en session avec Wordpress (ce truc immonde)
                          + +
                          + + + + + + +
                          +
                          +
                          +
                          +

                          Search results

                          + +
                          +
                          +
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + + + + + + diff --git a/documentation/packages/LDCCrmClient-enums.html b/documentation/packages/LDCCrmClient-enums.html index 87a4d18..e9eef39 100644 --- a/documentation/packages/LDCCrmClient-enums.html +++ b/documentation/packages/LDCCrmClient-enums.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            @@ -113,6 +115,8 @@
                            Country
                            Liste de Pays
                            +
                            LogLevel
                            +
                            QuestionType
                            diff --git a/documentation/packages/LDCCrmClient-exceptions.html b/documentation/packages/LDCCrmClient-exceptions.html index 5e8cb27..0f5e1de 100644 --- a/documentation/packages/LDCCrmClient-exceptions.html +++ b/documentation/packages/LDCCrmClient-exceptions.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            diff --git a/documentation/packages/LDCCrmClient-models.html b/documentation/packages/LDCCrmClient-models.html index 62a16e5..a85e5cc 100644 --- a/documentation/packages/LDCCrmClient-models.html +++ b/documentation/packages/LDCCrmClient-models.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            @@ -103,6 +105,9 @@
                            +
                            Answer
                            +
                            This class represents an answer +It has a method to submit answers
                            ArcadiaMailDefault
                            This class represents the customer info with the account validation status
                            @@ -113,14 +118,11 @@ the account validation status
                            This class represents the customer info with the account validation status. You can use it as a standalone class but beware of catching exceptions
                            -
                            SingleOptin
                            -
                            This class allows to handle single optins
                            -
                            Answer
                            -
                            This class represents an answer -It has a method to submit answers
                            Question
                            This class represents a question It has some static methods to retrieve questions and answers
                            +
                            SingleOptin
                            +
                            This class allows to handle single optins
                            diff --git a/documentation/packages/LDCCrmClient-transport.html b/documentation/packages/LDCCrmClient-transport.html index c686120..29218c0 100644 --- a/documentation/packages/LDCCrmClient-transport.html +++ b/documentation/packages/LDCCrmClient-transport.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            diff --git a/documentation/packages/LDCCrmClient-utilities.html b/documentation/packages/LDCCrmClient-utilities.html index 99d8d30..36df7b4 100644 --- a/documentation/packages/LDCCrmClient-utilities.html +++ b/documentation/packages/LDCCrmClient-utilities.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            diff --git a/documentation/packages/LDCCrmClient.html b/documentation/packages/LDCCrmClient.html index 97f53b5..3f93f42 100644 --- a/documentation/packages/LDCCrmClient.html +++ b/documentation/packages/LDCCrmClient.html @@ -70,7 +70,9 @@
                          • models
                          • transport
                          • utilities
                          • +
                          • Wordpress
                          • +

                            None

                            @@ -104,6 +106,7 @@
                            models
                            transport
                            utilities
                            +
                            Wordpress
                            diff --git a/documentation/packages/None.html b/documentation/packages/None.html new file mode 100644 index 0000000..cbcdc70 --- /dev/null +++ b/documentation/packages/None.html @@ -0,0 +1,132 @@ + + + + + CRM V2 + + + + + + + + + + + + + + + + + + + +
                            +

                            CRM V2

                            + + + + + +
                            + +
                            +
                            + + + + +
                            +
                              +
                            + +
                            +

                            None

                            + + + + + + + + + +
                            +
                            +
                            +
                            +

                            Search results

                            + +
                            +
                            +
                              +
                              +
                              +
                              +
                              +
                              + + +
                              + + + + + + + + diff --git a/documentation/packages/default.html b/documentation/packages/default.html index bee6c1c..e64a362 100644 --- a/documentation/packages/default.html +++ b/documentation/packages/default.html @@ -70,7 +70,9 @@
                            • models
                            • transport
                            • utilities
                            • +
                            • Wordpress
                            • +

                              None

                              @@ -100,6 +102,7 @@
                              LDCCrmClient
                              +
                              None
                              diff --git a/documentation/reports/deprecated.html b/documentation/reports/deprecated.html index d98c120..cc64b57 100644 --- a/documentation/reports/deprecated.html +++ b/documentation/reports/deprecated.html @@ -71,7 +71,9 @@
                            • models
                            • transport
                            • utilities
                            • +
                            • Wordpress
                            • +

                              None

                              diff --git a/documentation/reports/errors.html b/documentation/reports/errors.html index 769ccb3..9e5e6ad 100644 --- a/documentation/reports/errors.html +++ b/documentation/reports/errors.html @@ -71,7 +71,9 @@
                            • models
                            • transport
                            • utilities
                            • +
                            • Wordpress
                            • +

                              None

                              diff --git a/documentation/reports/markers.html b/documentation/reports/markers.html index 4633bd6..f5c3803 100644 --- a/documentation/reports/markers.html +++ b/documentation/reports/markers.html @@ -71,7 +71,9 @@
                            • models
                            • transport
                            • utilities
                            • +
                            • Wordpress
                            • +

                              None

                              @@ -99,7 +101,7 @@ - + @@ -108,6 +110,10 @@ + + + + @@ -120,10 +126,18 @@ + + + + + + + + @@ -135,15 +149,23 @@ - + - + + + + + - - + + + + + +
                              src/Enums/ApiError.php12
                              src/Enums/Country.php
                              src/Exceptions/CrmException.php 1
                              src/Models/Answer.php2
                              src/Models/ArcadiaMailDefault.php
                              src/Models/Customer.php 10
                              src/Models/Question.php7
                              src/Models/SingleOptin.php 1
                              src/Transport/ApiInterface.php1
                              src/Transport/Request.php
                              src/Utils.php13
                              src/Models/Answer.phpsrc/WordPress/WPCrm.php15
                              src/WordPress/WPCrmAnswer.php 2
                              src/Models/Question.php7src/WordPress/WPCrmQuestion.php2
                              src/WordPress/WPCrmUser.php2
                              @@ -160,7 +182,12 @@ - 53 + 56 + supportweb.ldc.fr + + + + 62 supportweb.ldc.fr @@ -200,6 +227,29 @@ supportweb.ldc.fr + + +

                              Answer.php

                              + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              81PUBLIC METHODS
                              106set apiInterface

                              ArcadiaMailDefault.php

                              @@ -234,17 +284,17 @@ - 234 + 238 validate customer hashcode - 240 + 244 Send mail - 242 + 246 set apiInterface @@ -267,17 +317,17 @@ - 151 + 155 validate customer hashcode - 157 + 161 Send mail - 159 + 163 set apiInterface @@ -295,42 +345,37 @@ - 292 + 289 phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed - 300 - phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed,Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed - - - - 366 + 349 cast anyway - 385 + 368 this to throw validation error if failure way - 393 + 376 PUBLIC METHODS - 403 + 390 set apiInterface - 462 + 457 set apiInterface - 475 + 471 set apiInterface @@ -340,112 +385,12 @@ - 512 + 516 set apiInterface - - - -

                              SingleOptin.php

                              - - - - - - - - - - - - - -
                              TypeLineDescription
                              42set apiInterface
                              - -

                              Request.php

                              - - - - - - - - - - - - - - - -
                              TypeLineDescription
                              173do not throw http errors
                              - -

                              Response.php

                              - - - - - - - - - - - - - - - - - - - - - - - - - -
                              TypeLineDescription
                              90Body should be json data
                              99Api Error
                              101CRM Exception or Any Exception
                              - -

                              Utils.php

                              - - - - - - - - - - - - - - - -
                              TypeLineDescription
                              107convert bool to integer
                              - -

                              Answer.php

                              - - - - - - - - - - - - - - - - - + @@ -483,20 +428,287 @@ - + - + - + +
                              TypeLineDescription
                              81PUBLIC METHODS
                              99556 set apiInterface
                              199202 set apiInterface
                              232239 set apiInterface
                              265276 set apiInterface
                              + +

                              SingleOptin.php

                              + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              46set apiInterface
                              + +

                              ApiInterface.php

                              + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              103handle http Auth
                              + +

                              Request.php

                              + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              173do not throw http errors
                              + +

                              Response.php

                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              91Body should be json data
                              100Api Error
                              102CRM Exception or Any Exception
                              + +

                              Utils.php

                              + + + + + + + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              55phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
                              181phpcs:ignore Generic.Files.LineLength.TooLong
                              277convert bool to integer
                              + +

                              WPCrm.php

                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              9opensource.org/licenses/MIT
                              28phpcs:ignore Squiz.PHP.CommentedOutCode.Found
                              29TABLE LDC CUSTOMERS
                              30CREATE TABLE `ldc_wp_customers` (
                              31`hashcode` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'Le hashcode (UUID)',
                              32`email` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Le customer email',
                              33`uuid` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Code unique (inscripton, validation, etc)',
                              34PRIMARY KEY (`hashcode`)
                              35)
                              36COMMENT='Les customers sur un WP liées à la CRM'
                              37COLLATE='utf8mb4_unicode_ci';
                              46opensource.org/licenses/MIT
                              376--- PRIVATE --- METHODS
                              47015 minutes session
                              615phpcs:ignore Squiz.PHP.GlobalKeyword.NotAllowed
                              + +

                              WPCrmAnswer.php

                              + + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              9opensource.org/licenses/MIT
                              25opensource.org/licenses/MIT
                              + +

                              WPCrmQuestion.php

                              + + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              9opensource.org/licenses/MIT
                              25opensource.org/licenses/MIT
                              + +

                              WPCrmUser.php

                              + + + + + + + + + + + + + + + + + + + +
                              TypeLineDescription
                              9opensource.org/licenses/MIT
                              65opensource.org/licenses/MIT
                              From 4fb4a02710a7329f5163a37346eabec60d1387b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 21 Sep 2021 12:05:39 +0200 Subject: [PATCH 4/5] ApiInterface fix replace needAuth by apiAuthFailed --- src/Transport/ApiInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transport/ApiInterface.php b/src/Transport/ApiInterface.php index bd8620a..d2883d1 100644 --- a/src/Transport/ApiInterface.php +++ b/src/Transport/ApiInterface.php @@ -140,7 +140,7 @@ class ApiInterface $this->storeCacheValue('api_token', static::$apiToken); } } catch (ApiErrorException $e) { - if ($e->getApiError()->equals(ApiError::needAuth()) and !$request->maxAttempted()) { + if ($e->getApiError()->equals(ApiError::apiAuthFailed()) and !$request->maxAttempted()) { $request->incrementAttempt(); $this->authenticate(); $response = $this->call($request); From b4982ab41b2d2df4bd0ec43b2e300c701aaa0184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 21 Sep 2021 12:05:56 +0200 Subject: [PATCH 5/5] client:generate --- apiConfig.readonly.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apiConfig.readonly.json b/apiConfig.readonly.json index df4e43c..8784673 100644 --- a/apiConfig.readonly.json +++ b/apiConfig.readonly.json @@ -1,5 +1,5 @@ { - "version": "2.1.7", + "version": "2.1.8", "tokenTimeout": 60, "apiRequestRatePerMinute": 256, "servicesDBCache": 10 diff --git a/composer.json b/composer.json index c80b940..888c3f0 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "library", "description": "LDC CRM Client V2", "license": "MIT", - "version": "2.1.7", + "version": "2.1.8", "authors": [ { "name": "Jérémy Munsch",