entry point traits namespace

This commit is contained in:
Yuri Kuznetsov
2021-03-20 11:52:52 +02:00
parent b023964aec
commit 69072cf0ca
13 changed files with 96 additions and 41 deletions

View File

@@ -0,0 +1,39 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2021 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
* Website: https://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\EntryPoint\Traits;
/**
* Auth is not required for entry point.
* To be used with EntryPoint interface.
*/
trait NoAuth
{
public static $noAuth = true;
}

View File

@@ -0,0 +1,38 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2021 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
* Website: https://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Core\EntryPoint\Traits;
/**
* To be used with EntryPoint interface.
*/
trait NotStrictAuth
{
public static $notStrictAuth = true;
}

View File

@@ -29,7 +29,10 @@
namespace Espo\Core\EntryPoints;
/**
* @deprecated Use `Espo\Core\EntryPoint\Traits\NoAuth` instead.
*/
trait NoAuth
{
public static $noAuth = true;
use \Espo\Core\EntryPoint\Traits\NoAuth;
}

View File

@@ -29,7 +29,10 @@
namespace Espo\Core\EntryPoints;
/**
* @deprecated Use `Espo\Core\EntryPoint\Traits\NotStrictAuth` instead.
*/
trait NotStrictAuth
{
public static $notStrictAuth = true;
use \Espo\Core\EntryPoint\Traits\NotStrictAuth;
}

View File

@@ -32,12 +32,9 @@ namespace Espo\EntryPoints;
use Espo\Core\Exceptions\NotFound;
use Espo\Core\Exceptions\BadRequest;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Utils\Config,
Utils\ClientManager,
ORM\EntityManager,

View File

@@ -29,15 +29,11 @@
namespace Espo\EntryPoints;
use Espo\Core\Exceptions\BadRequest;
use Espo\Core\Exceptions\Error;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\BadRequest,
Exceptions\Error,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Utils\ClientManager,
ServiceFactory,
Api\Request,

View File

@@ -29,12 +29,9 @@
namespace Espo\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFound,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
};

View File

@@ -29,12 +29,9 @@
namespace Espo\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
};

View File

@@ -29,14 +29,11 @@
namespace Espo\Modules\Crm\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFound,
Exceptions\BadRequest,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
ORM\EntityManager,

View File

@@ -34,14 +34,11 @@ use Espo\{
Modules\Crm\Entities\CampaignTrackingUrl,
};
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFoundSilent,
Exceptions\BadRequest,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
ORM\EntityManager,

View File

@@ -29,15 +29,12 @@
namespace Espo\Modules\Crm\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFound,
Exceptions\BadRequest,
Exceptions\Error,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
ORM\EntityManager,

View File

@@ -29,16 +29,13 @@
namespace Espo\Modules\Crm\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFound,
Exceptions\BadRequest,
Api\Request,
Api\Response,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
ORM\EntityManager,
Utils\ClientManager,
HookManager,

View File

@@ -29,14 +29,11 @@
namespace Espo\Modules\Crm\EntryPoints;
use Espo\Core\EntryPoints\{
NoAuth,
};
use Espo\Core\{
Exceptions\NotFound,
Exceptions\BadRequest,
EntryPoint\EntryPoint,
EntryPoint\Traits\NoAuth,
Api\Request,
Api\Response,
ORM\EntityManager,