Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 8d3ff49

Browse files
committed
Added PS version check to all php files; refs #43658
1 parent e56a618 commit 8d3ff49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+207
-0
lines changed

override/classes/Hook.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
* @copyright 2022 Axeptio
1717
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
1818
*/
19+
if (!defined('_PS_VERSION_')) {
20+
exit;
21+
}
1922

2023
/**
2124
* Override hook class

src/API/Client/Client.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Client;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\API\Request\AbstractRequest;
2327
use AxeptiocookiesAddon\API\Response\Factory\ResponseFactory;
2428

src/API/Request/AbstractRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Request;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
abstract class AbstractRequest
2832
{
2933
abstract public function getUrl();

src/API/Request/ProjectRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Request;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class ProjectRequest extends AbstractRequest
2327
{
2428
protected $baseUrl = 'https://client.axept.io/';

src/API/Request/VendorDbRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Request;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
class VendorDbRequest extends AbstractRequest
2832
{
2933
protected $baseUrl = 'https://api.axept.io/v1/vendors/plugin?data.platformId=64c8c424ebd89978a0bee99b';

src/API/Response/AbstractResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Response;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
abstract class AbstractResponse
2832
{
2933
protected $jsonResponse = [];

src/API/Response/Factory/ResponseFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Response\Factory;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
use AxeptiocookiesAddon\API\Request\AbstractRequest;
2832
use AxeptiocookiesAddon\API\Request\ProjectRequest;
2933
use AxeptiocookiesAddon\API\Request\VendorDbRequest;

src/API/Response/Object/AbstractObject.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Response\Object;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
abstract class AbstractObject implements \JsonSerializable
2327
{
2428
/**

src/API/Response/Object/Configuration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Response\Object;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class Configuration extends AbstractObject
2327
{
2428
/**

src/API/Response/Object/Project.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Response\Object;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class Project extends AbstractObject
2327
{
2428
/**

src/API/Response/Object/Vendor.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Response\Object;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
class Vendor extends AbstractObject
2832
{
2933
/**

src/API/Response/ProjectResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\API\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\API\Response\Object\Project;
2327

2428
class ProjectResponse extends AbstractResponse

src/API/Response/VendorDbResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
namespace AxeptiocookiesAddon\API\Response;
2626

27+
if (!defined('_PS_VERSION_')) {
28+
exit;
29+
}
30+
2731
use AxeptiocookiesAddon\API\Response\Object\Vendor;
2832

2933
class VendorDbResponse extends AbstractResponse

src/Cache/CacheParams.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Cache;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class CacheParams
2327
{
2428
/**

src/Cache/ProjectCache.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Cache;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\Model\Integration\IntegrationModel;
2327
use AxeptiocookiesClasslib\Utils\CacheStorage\CacheStorage;
2428

src/Entity/AxeptioConfiguration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Entity;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class AxeptioConfiguration extends \ObjectModel
2327
{
2428
/**

src/Entity/AxeptioModuleConfiguration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Entity;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class AxeptioModuleConfiguration extends \ObjectModel
2327
{
2428
/**

src/Factory/TemplateReplacementFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Factory;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\Handler\Template\AbstractTemplateHandler;
2327
use AxeptiocookiesAddon\Handler\Template\PsGoogleAnalyticsTemplateHandler;
2428
use AxeptiocookiesAddon\Model\Constant\TemplateFile;

src/Handler/Template/AbstractTemplateHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Handler\Template;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
abstract class AbstractTemplateHandler
2327
{
2428
/**

src/Handler/Template/PsGoogleAnalyticsTemplateHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Handler\Template;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\Service\HookService;
2327

2428
class PsGoogleAnalyticsTemplateHandler extends AbstractTemplateHandler

src/Hook/CommonHook.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Hook;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\Service\HookService;
2327
use AxeptiocookiesAddon\Smarty\CookiesCompletePrefilter;
2428
use AxeptiocookiesAddon\Utils\ServiceContainer;

src/Hook/HookDispatcher.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Hook;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesClasslib\Hook\AbstractHookDispatcher;
2327

2428
class HookDispatcher extends AbstractHookDispatcher

src/Model/Constant/TemplateFile.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Constant;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class TemplateFile
2327
{
2428
const PS_GOOGLE_ANALYTICS = 'modules/ps_googleanalytics/views/templates/hook/ps_googleanalytics.tpl';

src/Model/Constant/WhiteListModules.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Constant;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class WhiteListModules
2327
{
2428
const ALWAYS_SKIP_MODULES = [

src/Model/CreateConfigurationModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class CreateConfigurationModel
2327
{
2428
/**

src/Model/EditConfigurationModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\API\Response\Object\Configuration;
2327
use AxeptiocookiesAddon\API\Response\Object\Project;
2428

src/Model/Integration/IntegrationModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Integration;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class IntegrationModel implements \JsonSerializable
2327
{
2428
protected $clientId;

src/Model/Integration/StepModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Integration;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class StepModel implements \JsonSerializable
2327
{
2428
/**

src/Model/Integration/VendorModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Integration;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class VendorModel
2327
{
2428
protected $name;

src/Model/ListConfigurationModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\API\Response\Object\Configuration;
2327

2428
class ListConfigurationModel implements \JsonSerializable

src/Model/Response/ErrorResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesClasslib\Utils\Translate\TranslateTrait;
2327

2428
class ErrorResponse extends FrontResponse

src/Model/Response/FrontResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
abstract class FrontResponse implements \JsonSerializable
2327
{
2428
/**

src/Model/Response/ResponseResultType.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class ResponseResultType
2327
{
2428
const SUCCESS = 'success';

src/Model/Response/SuccessNotificationResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class SuccessNotificationResponse extends SuccessResponse
2327
{
2428
/**

src/Model/Response/SuccessResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Model\Response;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
class SuccessResponse extends FrontResponse
2327
{
2428
protected $type = ResponseResultType::SUCCESS;

src/Repository/ConfigurationRepository.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
namespace AxeptiocookiesAddon\Repository;
2121

22+
if (!defined('_PS_VERSION_')) {
23+
exit;
24+
}
25+
2226
use AxeptiocookiesAddon\Entity\AxeptioConfiguration;
2327

2428
class ConfigurationRepository

0 commit comments

Comments
 (0)