mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
@@ -27,10 +27,10 @@ namespace SP\Modules\Api\Controllers\Category;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Api\Dtos\ApiResponse;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
|
||||
/**
|
||||
* Class SearchController
|
||||
@@ -62,12 +62,12 @@ final class SearchController extends CategoryBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemSearchData
|
||||
* @return ItemSearchDto
|
||||
* @throws ServiceException
|
||||
*/
|
||||
private function buildSearchData(): ItemSearchData
|
||||
private function buildSearchData(): ItemSearchDto
|
||||
{
|
||||
$itemSearchData = new ItemSearchData();
|
||||
$itemSearchData = new ItemSearchDto();
|
||||
$itemSearchData->setSeachString($this->apiService->getParamString('text'));
|
||||
$itemSearchData->setLimitCount(
|
||||
$this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace SP\Modules\Api\Controllers\Client;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Api\Dtos\ApiResponse;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
|
||||
/**
|
||||
* Class SearchController
|
||||
@@ -62,12 +62,12 @@ final class SearchController extends ClientBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemSearchData
|
||||
* @return ItemSearchDto
|
||||
* @throws ServiceException
|
||||
*/
|
||||
private function buildSearchData(): ItemSearchData
|
||||
private function buildSearchData(): ItemSearchDto
|
||||
{
|
||||
$itemSearchData = new ItemSearchData();
|
||||
$itemSearchData = new ItemSearchDto();
|
||||
$itemSearchData->setSeachString($this->apiService->getParamString('text'));
|
||||
$itemSearchData->setLimitCount(
|
||||
$this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace SP\Modules\Api\Controllers\Tag;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Api\Dtos\ApiResponse;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
|
||||
/**
|
||||
* Class SearchController
|
||||
@@ -61,12 +61,12 @@ final class SearchController extends TagBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemSearchData
|
||||
* @return ItemSearchDto
|
||||
* @throws ServiceException
|
||||
*/
|
||||
private function buildSearchData(): ItemSearchData
|
||||
private function buildSearchData(): ItemSearchDto
|
||||
{
|
||||
return new ItemSearchData(
|
||||
return new ItemSearchDto(
|
||||
$this->apiService->getParamString('text'),
|
||||
0,
|
||||
$this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS)
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace SP\Modules\Api\Controllers\UserGroup;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Api\Dtos\ApiResponse;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
|
||||
/**
|
||||
* Class SearchController
|
||||
@@ -60,12 +60,12 @@ final class SearchController extends UserGroupBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ItemSearchData
|
||||
* @return ItemSearchDto
|
||||
* @throws ServiceException
|
||||
*/
|
||||
private function buildSearchData(): ItemSearchData
|
||||
private function buildSearchData(): ItemSearchDto
|
||||
{
|
||||
$itemSearchData = new ItemSearchData();
|
||||
$itemSearchData = new ItemSearchDto();
|
||||
$itemSearchData->setSeachString($this->apiService->getParamString('text'));
|
||||
$itemSearchData->setLimitCount($this->apiService->getParamInt('count', false, self::SEARCH_COUNT_ITEMS));
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ use SP\Domain\Config\Ports\ConfigFileService;
|
||||
use SP\Domain\Core\Exceptions\InstallError;
|
||||
use SP\Domain\Core\Exceptions\InvalidArgumentException;
|
||||
use SP\Domain\Install\Adapters\InstallData;
|
||||
use SP\Domain\Install\Ports\InstallerServiceInterface;
|
||||
use SP\Domain\Install\Services\InstallerService;
|
||||
use SP\Domain\Install\Ports\InstallerService;
|
||||
use SP\Domain\Install\Services\Installer;
|
||||
use SP\Util\Util;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@@ -67,13 +67,13 @@ final class InstallCommand extends CommandBase
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $defaultName = 'sp:install';
|
||||
private InstallerService $installer;
|
||||
protected static $defaultName = 'sp:install';
|
||||
private Installer $installer;
|
||||
|
||||
public function __construct(
|
||||
LoggerInterface $logger,
|
||||
ConfigFileService $config,
|
||||
InstallerServiceInterface $installer
|
||||
InstallerService $installer
|
||||
) {
|
||||
parent::__construct($logger, $config);
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace SP\Modules\Web\Controllers\AccessManager;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Ports\PublicLinkService;
|
||||
use SP\Domain\Auth\Ports\AuthTokenService;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\User\Ports\UserGroupService;
|
||||
@@ -53,8 +53,8 @@ use SP\Mvc\Controller\WebControllerHelper;
|
||||
*/
|
||||
final class IndexController extends ControllerBase
|
||||
{
|
||||
protected ItemSearchData $itemSearchData;
|
||||
protected TabsGridHelper $tabsGridHelper;
|
||||
protected ItemSearchDto $itemSearchData;
|
||||
protected TabsGridHelper $tabsGridHelper;
|
||||
private UserGrid $userGrid;
|
||||
private UserGroupGrid $userGroupGrid;
|
||||
private UserProfileGrid $userProfileGrid;
|
||||
@@ -96,7 +96,7 @@ final class IndexController extends ControllerBase
|
||||
$this->authTokenService = $authTokenService;
|
||||
$this->publicLinkService = $publicLinkService;
|
||||
$this->tabsGridHelper = $tabsGridHelper;
|
||||
$this->itemSearchData = new ItemSearchData();
|
||||
$this->itemSearchData = new ItemSearchDto();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,13 +29,13 @@ use JsonException;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\DataModel\File;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Account\Ports\AccountFileService;
|
||||
use SP\Domain\Account\Ports\AccountService;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
use SP\Domain\File\Ports\FileHandlerInterface;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
use SP\Infrastructure\File\FileHandler;
|
||||
use SP\Infrastructure\File\FileHandlerInterface;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Modules\Web\Controllers\Traits\JsonTrait;
|
||||
use SP\Mvc\Controller\WebControllerHelper;
|
||||
@@ -161,7 +161,7 @@ final class UploadController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param File $fileData
|
||||
* @param \SP\Domain\Account\Models\File $fileData
|
||||
* @param FileHandlerInterface $fileHandler
|
||||
*
|
||||
* @return string
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,8 +27,8 @@ namespace SP\Modules\Web\Controllers\Helpers\Grid;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Core\Acl\AclInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Http\RequestInterface;
|
||||
use SP\Html\DataGrid\Action\DataGridActionSearch;
|
||||
use SP\Html\DataGrid\DataGridData;
|
||||
@@ -67,13 +67,13 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
* Actualizar los datos del paginador
|
||||
*
|
||||
* @param DataGridInterface $dataGrid
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return DataGridInterface
|
||||
*/
|
||||
public function updatePager(
|
||||
DataGridInterface $dataGrid,
|
||||
ItemSearchData $itemSearchData
|
||||
ItemSearchDto $itemSearchData
|
||||
): DataGridInterface {
|
||||
$dataGrid->getPager()
|
||||
->setLimitStart($itemSearchData->getLimitStart())
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -35,7 +35,7 @@ use SP\Domain\Core\Crypt\CryptPKIInterface;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
use SP\Domain\Core\UI\ThemeInterface;
|
||||
use SP\Domain\Http\RequestInterface;
|
||||
use SP\Domain\Install\Services\InstallerService;
|
||||
use SP\Domain\Install\Services\Installer;
|
||||
use SP\Html\DataGrid\Action\DataGridAction;
|
||||
use SP\Http\Uri;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
@@ -122,7 +122,7 @@ final class LayoutHelper extends HelperBase
|
||||
$this->view->assign('app_desc', AppInfoInterface::APP_DESC);
|
||||
$this->view->assign('app_website_url', AppInfoInterface::APP_WEBSITE_URL);
|
||||
$this->view->assign('app_blog_url', AppInfoInterface::APP_BLOG_URL);
|
||||
$this->view->assign('app_version', InstallerService::VERSION_TEXT);
|
||||
$this->view->assign('app_version', Installer::VERSION_TEXT);
|
||||
$this->view->assign('logo_icon', $baseUrl . '/public/images/logo_icon.png');
|
||||
$this->view->assign('logo_no_bg_color', $baseUrl . '/public/images/logo_full_nobg_outline_color.png');
|
||||
$this->view->assign('logo_no_bg', $baseUrl . '/public/images/logo_full_nobg_outline.png');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -29,7 +29,7 @@ use Exception;
|
||||
use SP\Core\Application;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
use SP\Domain\Install\Adapters\InstallDataFactory;
|
||||
use SP\Domain\Install\Ports\InstallerServiceInterface;
|
||||
use SP\Domain\Install\Ports\InstallerService;
|
||||
use SP\Http\JsonMessage;
|
||||
use SP\Modules\Web\Controllers\ControllerBase;
|
||||
use SP\Modules\Web\Controllers\Traits\JsonTrait;
|
||||
@@ -42,12 +42,12 @@ final class InstallController extends ControllerBase
|
||||
{
|
||||
use JsonTrait;
|
||||
|
||||
private InstallerServiceInterface $installer;
|
||||
private InstallerService $installer;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
WebControllerHelper $webControllerHelper,
|
||||
InstallerServiceInterface $installer
|
||||
InstallerService $installer
|
||||
) {
|
||||
parent::__construct($application, $webControllerHelper);
|
||||
|
||||
|
||||
@@ -27,13 +27,13 @@ namespace SP\Modules\Web\Controllers\ItemManager;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Ports\AccountFileService;
|
||||
use SP\Domain\Account\Ports\AccountHistoryService;
|
||||
use SP\Domain\Account\Ports\AccountService;
|
||||
use SP\Domain\Category\Ports\CategoryService;
|
||||
use SP\Domain\Client\Ports\ClientService;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\CustomField\Ports\CustomFieldDefinitionService;
|
||||
@@ -60,8 +60,8 @@ use SP\Mvc\Controller\WebControllerHelper;
|
||||
*/
|
||||
final class IndexController extends ControllerBase
|
||||
{
|
||||
protected ?ItemSearchData $itemSearchData = null;
|
||||
private TabsGridHelper $tabsGridHelper;
|
||||
protected ?ItemSearchDto $itemSearchData = null;
|
||||
private TabsGridHelper $tabsGridHelper;
|
||||
private CategoryService $categoryService;
|
||||
private TagService $tagService;
|
||||
private ClientService $clientService;
|
||||
@@ -140,7 +140,7 @@ final class IndexController extends ControllerBase
|
||||
*/
|
||||
protected function getGridTabs(): void
|
||||
{
|
||||
$this->itemSearchData = new ItemSearchData(null, 0, $this->configData->getAccountCount());
|
||||
$this->itemSearchData = new ItemSearchDto(null, 0, $this->configData->getAccountCount());
|
||||
|
||||
if ($this->checkAccess(AclActionsInterface::CATEGORY)) {
|
||||
$this->tabsGridHelper->addTab($this->getCategoriesList());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -28,7 +28,7 @@ namespace SP\Modules\Web\Controllers\PublicLink;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Bootstrap\BootstrapWeb;
|
||||
use SP\DataModel\PublicLinkList;
|
||||
use SP\Domain\Account\Models\PublicLinkList;
|
||||
use SP\Domain\Account\Ports\AccountService;
|
||||
use SP\Domain\Account\Ports\PublicLinkService;
|
||||
use SP\Domain\Account\Services\PublicLink;
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace SP\Modules\Web\Controllers\SecurityManager;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Security\Ports\EventlogService;
|
||||
@@ -47,8 +47,8 @@ use SP\Mvc\Controller\WebControllerHelper;
|
||||
*/
|
||||
final class IndexController extends ControllerBase
|
||||
{
|
||||
protected ItemSearchData $itemSearchData;
|
||||
protected TabsGridHelper $tabsGridHelper;
|
||||
protected ItemSearchDto $itemSearchData;
|
||||
protected TabsGridHelper $tabsGridHelper;
|
||||
private EventlogGrid $eventlogGrid;
|
||||
private TrackGrid $trackGrid;
|
||||
private EventlogService $eventlogService;
|
||||
@@ -73,7 +73,7 @@ final class IndexController extends ControllerBase
|
||||
$this->eventlogService = $eventlogService;
|
||||
$this->trackService = $trackService;
|
||||
|
||||
$this->itemSearchData = new ItemSearchData();
|
||||
$this->itemSearchData = new ItemSearchDto();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var File $file
|
||||
* @var \SP\Domain\Account\Models\File $file
|
||||
*/
|
||||
|
||||
use SP\DataModel\File;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Core\UI\ThemeIconsInterface;
|
||||
use SP\Html\Html;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Install\Services\InstallerService;
|
||||
use SP\Domain\Install\Services\Installer;
|
||||
use SP\Domain\Plugin\Ports\Plugin;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Util\VersionUtil;
|
||||
@@ -59,7 +59,7 @@
|
||||
<?php
|
||||
printf(
|
||||
'%s (<b>%s</b>)',
|
||||
InstallerService::VERSION_TEXT,
|
||||
Installer::VERSION_TEXT,
|
||||
VersionUtil::getVersionStringNormalized()
|
||||
); ?>
|
||||
<br>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\DataModel\File;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,14 +23,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var PublicLinkList $publicLink
|
||||
* @var \SP\Domain\Account\Models\PublicLinkList $publicLink
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\DataModel\PublicLinkList;
|
||||
use SP\Domain\Account\Models\PublicLinkList;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
namespace SP\Core\Acl;
|
||||
|
||||
use SP\DataModel\Action;
|
||||
use SP\Domain\Core\Acl\ActionNotFoundException;
|
||||
use SP\Domain\Core\Acl\ActionsInterface;
|
||||
use SP\Domain\Core\Models\Action;
|
||||
use SP\Domain\Storage\Ports\FileCacheService;
|
||||
use SP\Domain\Storage\Ports\XmlFileStorageService;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,8 +27,8 @@ namespace SP\Core\Crypt;
|
||||
use phpseclib\Crypt\RSA;
|
||||
use SP\Domain\Core\Crypt\CryptPKIInterface;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
use SP\Domain\File\Ports\FileHandlerInterface;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
use SP\Infrastructure\File\FileHandlerInterface;
|
||||
|
||||
use function SP\processException;
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ use SP\Domain\Core\LanguageInterface;
|
||||
use SP\Domain\Core\UI\ThemeContextInterface;
|
||||
use SP\Domain\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Core\UI\ThemeInterface;
|
||||
use SP\Domain\Database\Ports\DatabaseInterface;
|
||||
use SP\Domain\Database\Ports\DbStorageHandler;
|
||||
use SP\Domain\Export\Ports\BackupFileHelperService;
|
||||
use SP\Domain\Export\Services\BackupFileHelper;
|
||||
use SP\Domain\Html\MinifyInterface;
|
||||
@@ -80,8 +82,6 @@ use SP\Http\Client;
|
||||
use SP\Http\Request;
|
||||
use SP\Infrastructure\Database\Database;
|
||||
use SP\Infrastructure\Database\DatabaseConnectionData;
|
||||
use SP\Infrastructure\Database\DatabaseInterface;
|
||||
use SP\Infrastructure\Database\DbStorageHandler;
|
||||
use SP\Infrastructure\Database\MysqlHandler;
|
||||
use SP\Infrastructure\File\DirectoryHandler;
|
||||
use SP\Infrastructure\File\FileCache;
|
||||
|
||||
@@ -44,65 +44,46 @@ use function DI\factory;
|
||||
*/
|
||||
final class DomainDefinitions
|
||||
{
|
||||
private const DOMAINS = [
|
||||
'Account',
|
||||
'Api',
|
||||
'Auth',
|
||||
'Category',
|
||||
'Client',
|
||||
'Config',
|
||||
'Crypt',
|
||||
'CustomField',
|
||||
'Export',
|
||||
'Import',
|
||||
'Install',
|
||||
'ItemPreset',
|
||||
'Notification',
|
||||
'Plugins',
|
||||
'Security',
|
||||
'Tag',
|
||||
'User',
|
||||
];
|
||||
|
||||
private const PORTS = [
|
||||
'Service' => 'SP\Domain\%s\Services',
|
||||
'Repository' => 'SP\Infrastructure\%s\Repositories',
|
||||
'Adapter' => 'SP\Domain\%s\Adapters'
|
||||
];
|
||||
|
||||
public static function getDefinitions(): array
|
||||
{
|
||||
$sources = [];
|
||||
|
||||
foreach (self::DOMAINS as $domain) {
|
||||
foreach (self::PORTS as $suffix => $target) {
|
||||
$key = sprintf('SP\Domain\%s\Ports\*%s', $domain, $suffix);
|
||||
$sources[$key] = autowire(sprintf($target, $domain));
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'SP\Domain\Account\Ports\*ServiceInterface' => autowire('SP\Domain\Account\Services\*Service'),
|
||||
'SP\Domain\Account\Adapters\*AdapterInterface' => autowire('SP\Domain\Account\Adapters\*Adapter'),
|
||||
'SP\Domain\Account\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Account\Repositories\*Repository'
|
||||
),
|
||||
...$sources,
|
||||
AccountSearchDataBuilder::class => autowire(AccountSearchData::class),
|
||||
'SP\Domain\Category\Ports\*ServiceInterface' => autowire('SP\Domain\Category\Services\*Service'),
|
||||
'SP\Domain\Category\Adapters\*AdapterInterface' => autowire('SP\Domain\Category\Out\*Adapter'),
|
||||
'SP\Domain\Category\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Category\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Client\Ports\*ServiceInterface' => autowire('SP\Domain\Client\Services\*Service'),
|
||||
'SP\Domain\Client\Adapters\*AdapterInterface' => autowire('SP\Domain\Client\Out\*Adapter'),
|
||||
'SP\Domain\Client\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Client\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Tag\Ports\*ServiceInterface' => autowire('SP\Domain\Tag\Services\*Service'),
|
||||
'SP\Domain\Tag\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Tag\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\User\Ports\*ServiceInterface' => autowire('SP\Domain\User\Services\*Service'),
|
||||
'SP\Domain\User\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\User\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Auth\Ports\*ServiceInterface' => autowire('SP\Domain\Auth\Services\*Service'),
|
||||
'SP\Domain\Auth\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Auth\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\CustomField\Ports\*ServiceInterface' => autowire('SP\Domain\CustomField\Services\*Service'),
|
||||
'SP\Domain\CustomField\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\CustomField\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Export\Ports\*ServiceInterface' => autowire('SP\Domain\Export\Services\*Service'),
|
||||
'SP\Domain\Import\Ports\*ServiceInterface' => autowire('SP\Domain\Import\Services\*Service'),
|
||||
'SP\Domain\Install\Ports\*ServiceInterface' => autowire('SP\Domain\Install\Services\*Service'),
|
||||
'SP\Domain\Crypt\Ports\*ServiceInterface' => autowire('SP\Domain\Crypt\Services\*Service'),
|
||||
'SP\Domain\Plugin\Ports\*ServiceInterface' => autowire('SP\Domain\Plugin\Services\*Service'),
|
||||
'SP\Domain\ItemPreset\Ports\*ServiceInterface' => autowire('SP\Domain\ItemPreset\Services\*Service'),
|
||||
'SP\Domain\ItemPreset\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\ItemPreset\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Notification\Ports\*ServiceInterface' => autowire('SP\Domain\Notification\Services\*Service'),
|
||||
'SP\Domain\Notification\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Notification\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Security\Ports\*ServiceInterface' => autowire('SP\Domain\Security\Services\*Service'),
|
||||
'SP\Domain\Security\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Security\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Config\Ports\*ServiceInterface' => autowire('SP\Domain\Config\Services\*Service'),
|
||||
'SP\Domain\Config\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Config\Repositories\*Repository'
|
||||
),
|
||||
'SP\Domain\Plugin\Ports\*RepositoryInterface' => autowire(
|
||||
'SP\Infrastructure\Plugin\Repositories\*Repository'
|
||||
),
|
||||
SecureSessionService::class => factory(
|
||||
static function (ContainerInterface $c) {
|
||||
$fileCache = new FileCache(
|
||||
|
||||
@@ -1,310 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2021, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass 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.
|
||||
*
|
||||
* sysPass 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 sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
|
||||
/**
|
||||
* Class PublickLinkOldData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
*/
|
||||
class PublickLinkOldData
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $itemId = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $userId = 0;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $linkHash = '';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $typeId = 0;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $notify = false;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $dateAdd = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $dateExpire = 0;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $pass = '';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $passIV = '';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $countViews = 0;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $maxCountViews = 0;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $useInfo = [];
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $data;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getItemId()
|
||||
{
|
||||
return $this->itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $itemId
|
||||
*/
|
||||
public function setItemId($itemId)
|
||||
{
|
||||
$this->itemId = $itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getUserId()
|
||||
{
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $userId
|
||||
*/
|
||||
public function setUserId($userId)
|
||||
{
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLinkHash()
|
||||
{
|
||||
return $this->linkHash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $linkHash
|
||||
*/
|
||||
public function setLinkHash($linkHash)
|
||||
{
|
||||
$this->linkHash = $linkHash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTypeId()
|
||||
{
|
||||
return $this->typeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $typeId
|
||||
*/
|
||||
public function setTypeId($typeId)
|
||||
{
|
||||
$this->typeId = $typeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isNotify()
|
||||
{
|
||||
return (bool)$this->notify;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $notify
|
||||
*/
|
||||
public function setNotify($notify)
|
||||
{
|
||||
$this->notify = $notify;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDateAdd()
|
||||
{
|
||||
return $this->dateAdd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $dateAdd
|
||||
*/
|
||||
public function setDateAdd($dateAdd)
|
||||
{
|
||||
$this->dateAdd = $dateAdd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDateExpire()
|
||||
{
|
||||
return $this->dateExpire;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $dateExpire
|
||||
*/
|
||||
public function setDateExpire($dateExpire)
|
||||
{
|
||||
$this->dateExpire = $dateExpire;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPass()
|
||||
{
|
||||
return $this->pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pass
|
||||
*/
|
||||
public function setPass($pass)
|
||||
{
|
||||
$this->pass = $pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPassIV()
|
||||
{
|
||||
return $this->passIV;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $passIV
|
||||
*/
|
||||
public function setPassIV($passIV)
|
||||
{
|
||||
$this->passIV = $passIV;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getCountViews()
|
||||
{
|
||||
return $this->countViews;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $countViews
|
||||
*/
|
||||
public function setCountViews($countViews)
|
||||
{
|
||||
$this->countViews = $countViews;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function addCountViews()
|
||||
{
|
||||
return $this->countViews++;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxCountViews()
|
||||
{
|
||||
return $this->maxCountViews;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $maxCountViews
|
||||
*/
|
||||
public function setMaxCountViews($maxCountViews)
|
||||
{
|
||||
$this->maxCountViews = $maxCountViews;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getUseInfo()
|
||||
{
|
||||
return $this->useInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $useInfo
|
||||
*/
|
||||
public function setUseInfo(array $useInfo)
|
||||
{
|
||||
$this->useInfo = $useInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $useInfo
|
||||
*/
|
||||
public function addUseInfo($useInfo)
|
||||
{
|
||||
$this->useInfo[] = $useInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getData()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
*/
|
||||
public function setData($data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ use SP\Domain\Common\Models\ItemWithIdAndNameModel;
|
||||
use SP\Domain\Common\Models\Model;
|
||||
|
||||
/**
|
||||
* Class AccountPassData
|
||||
* Class AccountPassItemWithIdAndName
|
||||
*/
|
||||
class AccountPassItemWithIdAndName extends Model implements ItemWithIdAndNameModel
|
||||
{
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
|
||||
namespace SP\Domain\Account\Adapters;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Models\AccountSearchView;
|
||||
use SP\Domain\Account\Services\PublicLink;
|
||||
use SP\Domain\Common\Dtos\ItemDataTrait;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Core\Bootstrap\UriContextInterface;
|
||||
use SP\Html\Html;
|
||||
|
||||
/**
|
||||
* Class AccountSearchItem para contener los datos de cada cuenta en la búsqueda
|
||||
* Class AccountSearchItem
|
||||
*/
|
||||
final class AccountSearchItem
|
||||
{
|
||||
@@ -248,7 +248,7 @@ final class AccountSearchItem
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
* @return \SP\Domain\Common\Models\Item[]
|
||||
*/
|
||||
public function getTags(): array
|
||||
{
|
||||
|
||||
@@ -24,14 +24,12 @@
|
||||
|
||||
namespace SP\Domain\Account\Dtos;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Models\AccountSearchView;
|
||||
use SP\Domain\Common\Dtos\ItemDataTrait;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
|
||||
/**
|
||||
* Class AccountAclDto
|
||||
*
|
||||
* @package SP\DataModel\Dto
|
||||
*/
|
||||
final class AccountAclDto
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -26,12 +26,10 @@ namespace SP\Domain\Account\Dtos;
|
||||
|
||||
/**
|
||||
* Class AccountCacheDto
|
||||
*
|
||||
* @package SP\DataModel\Dto
|
||||
*/
|
||||
class AccountCacheDto
|
||||
readonly class AccountCacheDto
|
||||
{
|
||||
private readonly int $time;
|
||||
private int $time;
|
||||
|
||||
/**
|
||||
* AccountCacheDto constructor.
|
||||
@@ -41,9 +39,9 @@ class AccountCacheDto
|
||||
* @param array $userGroups
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly int $accountId,
|
||||
private readonly array $users,
|
||||
private readonly array $userGroups
|
||||
private int $accountId,
|
||||
private array $users,
|
||||
private array $userGroups
|
||||
) {
|
||||
$this->time = time();
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Account\Dtos;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Models\AccountView;
|
||||
use SP\Domain\Common\Dtos\Dto;
|
||||
use SP\Domain\Common\Dtos\ItemDataTrait;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
|
||||
/**
|
||||
* Class AccountEnrichedDto
|
||||
@@ -38,15 +38,15 @@ class AccountEnrichedDto extends Dto
|
||||
|
||||
private readonly int $id;
|
||||
/**
|
||||
* @var Item[] Los usuarios secundarios de la cuenta.
|
||||
* @var \SP\Domain\Common\Models\Item[] Los usuarios secundarios de la cuenta.
|
||||
*/
|
||||
private array $users = [];
|
||||
/**
|
||||
* @var Item[] Los grupos secundarios de la cuenta.
|
||||
* @var \SP\Domain\Common\Models\Item[] Los grupos secundarios de la cuenta.
|
||||
*/
|
||||
private array $userGroups = [];
|
||||
/**
|
||||
* @var Item[] Las etiquetas de la cuenta.
|
||||
* @var \SP\Domain\Common\Models\Item[] Las etiquetas de la cuenta.
|
||||
*/
|
||||
private array $tags = [];
|
||||
|
||||
@@ -69,7 +69,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item[] $users
|
||||
* @param \SP\Domain\Common\Models\Item[] $users
|
||||
*
|
||||
* @return AccountEnrichedDto
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item[] $groups
|
||||
* @param \SP\Domain\Common\Models\Item[] $groups
|
||||
*
|
||||
* @return AccountEnrichedDto
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Item[] $tags
|
||||
* @param \SP\Domain\Common\Models\Item[] $tags
|
||||
*
|
||||
* @return AccountEnrichedDto
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
* @return \SP\Domain\Common\Models\Item[]
|
||||
*/
|
||||
public function getUsers(): array
|
||||
{
|
||||
@@ -116,7 +116,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
* @return \SP\Domain\Common\Models\Item[]
|
||||
*/
|
||||
public function getUserGroups(): array
|
||||
{
|
||||
@@ -124,7 +124,7 @@ class AccountEnrichedDto extends Dto
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Item[]
|
||||
* @return \SP\Domain\Common\Models\Item[]
|
||||
*/
|
||||
public function getTags(): array
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -29,13 +29,13 @@ use SP\Domain\Account\Models\Account;
|
||||
/**
|
||||
* Class AccountHistoryCreateDto
|
||||
*/
|
||||
class AccountHistoryCreateDto
|
||||
readonly class AccountHistoryCreateDto
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Account $account,
|
||||
private readonly bool $isModify,
|
||||
private readonly bool $isDelete,
|
||||
private readonly string $masterPassHash
|
||||
private Account $account,
|
||||
private bool $isModify,
|
||||
private bool $isDelete,
|
||||
private string $masterPassHash
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,12 +27,12 @@ namespace SP\Domain\Account\Dtos;
|
||||
/**
|
||||
* Class AccountPasswordRequest
|
||||
*/
|
||||
final class AccountPasswordRequest
|
||||
final readonly class AccountPasswordRequest
|
||||
{
|
||||
public function __construct(
|
||||
private readonly int $id,
|
||||
private readonly EncryptedPassword $encryptedPassword,
|
||||
private readonly ?string $hash = null
|
||||
private int $id,
|
||||
private EncryptedPassword $encryptedPassword,
|
||||
private ?string $hash = null
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -26,8 +26,6 @@ namespace SP\Domain\Account\Dtos;
|
||||
|
||||
/**
|
||||
* Class AccountRequest
|
||||
*
|
||||
* @package SP\Account
|
||||
*/
|
||||
final class AccountRequest
|
||||
{
|
||||
|
||||
@@ -28,8 +28,6 @@ use SP\Domain\Account\Ports\AccountSearchConstants;
|
||||
|
||||
/**
|
||||
* Class AccountSearchFilter
|
||||
*
|
||||
* @package SP\Domain\Account\Filters
|
||||
*/
|
||||
final class AccountSearchFilterDto
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace SP\Domain\Account\Dtos;
|
||||
|
||||
/**
|
||||
* Class AccountSearchTokens
|
||||
* Class AccountSearchTokensDto
|
||||
*/
|
||||
final class AccountSearchTokensDto
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace SP\Domain\Account\Dtos;
|
||||
|
||||
/**
|
||||
* Class AccountBulkRequest
|
||||
* Class AccountUpdateBulkDto
|
||||
*/
|
||||
final class AccountUpdateBulkDto
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,12 +27,12 @@ namespace SP\Domain\Account\Dtos;
|
||||
/**
|
||||
* Class EncryptedPassword
|
||||
*/
|
||||
final class EncryptedPassword
|
||||
final readonly class EncryptedPassword
|
||||
{
|
||||
public function __construct(
|
||||
private readonly string $pass,
|
||||
private readonly string $key,
|
||||
private readonly ?string $hash = null
|
||||
private string $pass,
|
||||
private string $key,
|
||||
private ?string $hash = null
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ use SP\Util\PasswordUtil;
|
||||
|
||||
/**
|
||||
* Class PublicLinkKey
|
||||
*
|
||||
* @package SP\Domain\Common\Services\PublicLink
|
||||
*/
|
||||
final class PublicLinkKey
|
||||
{
|
||||
|
||||
@@ -22,15 +22,13 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
namespace SP\Domain\Account\Models;
|
||||
|
||||
use SP\Domain\Common\Models\ItemWithIdAndNameModel;
|
||||
use SP\Domain\Common\Models\Model;
|
||||
|
||||
/**
|
||||
* Class FileData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
* Class File
|
||||
*/
|
||||
class File extends Model implements ItemWithIdAndNameModel
|
||||
{
|
||||
@@ -22,12 +22,10 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
namespace SP\Domain\Account\Models;
|
||||
|
||||
/**
|
||||
* Class FileExtData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
*/
|
||||
class FileExtData extends File
|
||||
{
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -22,14 +22,10 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
|
||||
use SP\Domain\Account\Models\PublicLink;
|
||||
namespace SP\Domain\Account\Models;
|
||||
|
||||
/**
|
||||
* Class PublicLinkListData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
* Class PublicLinkList
|
||||
*/
|
||||
class PublicLinkList extends PublicLink
|
||||
{
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\File;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Infrastructure\Database\QueryResult;
|
||||
@@ -94,9 +94,9 @@ interface AccountFileRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\File;
|
||||
use SP\DataModel\FileExtData;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Account\Models\FileExtData;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\InvalidImageException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -87,7 +87,7 @@ interface AccountFileService
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function search(ItemSearchData $searchData): QueryResult;
|
||||
public function search(ItemSearchDto $searchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Returns the item for given id
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
|
||||
use SP\Domain\Account\Dtos\EncryptedPassword;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Infrastructure\Database\QueryResult;
|
||||
|
||||
/**
|
||||
@@ -116,10 +116,10 @@ interface AccountHistoryRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
|
||||
use SP\Domain\Account\Dtos\EncryptedPassword;
|
||||
use SP\Domain\Account\Models\AccountHistory;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -62,7 +62,7 @@ interface AccountHistoryService
|
||||
* @throws QueryException
|
||||
* @throws ConstraintException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Crea una nueva cuenta en la BBDD
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Dtos\EncryptedPassword;
|
||||
use SP\Domain\Account\Models\Account;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -249,11 +249,11 @@ interface AccountRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Create an account from deleted
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Dtos\AccountCreateDto;
|
||||
use SP\Domain\Account\Dtos\AccountEnrichedDto;
|
||||
use SP\Domain\Account\Dtos\AccountHistoryDto;
|
||||
@@ -35,6 +34,7 @@ use SP\Domain\Account\Models\Account;
|
||||
use SP\Domain\Account\Models\AccountView;
|
||||
use SP\Domain\Common\Models\Simple;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\NoSuchPropertyException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -235,11 +235,11 @@ interface AccountService
|
||||
public function getAllBasic(): array;
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Devolver el número total de cuentas
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
namespace SP\Domain\Account\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Models\PublicLink;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -72,11 +72,11 @@ interface PublicLinkRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Creates an item
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -26,11 +26,11 @@ namespace SP\Domain\Account\Ports;
|
||||
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\DataModel\PublicLinkList;
|
||||
use SP\Domain\Account\Dtos\PublicLinkKey;
|
||||
use SP\Domain\Account\Models\PublicLink;
|
||||
use SP\Domain\Account\Models\PublicLinkList;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -48,7 +48,7 @@ interface PublicLinkService
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\ItemPreset\AccountPrivate;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\Domain\Account\Dtos\AccountCreateDto;
|
||||
use SP\Domain\Account\Dtos\AccountEnrichedDto;
|
||||
@@ -50,6 +49,7 @@ use SP\Domain\Common\Models\Simple;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Config\Ports\ConfigService;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\NoSuchPropertyException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -63,9 +63,7 @@ use SP\Infrastructure\Database\QueryResult;
|
||||
use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class AccountService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class Account
|
||||
*/
|
||||
final class Account extends Service implements AccountService
|
||||
{
|
||||
@@ -598,11 +596,11 @@ final class Account extends Service implements AccountService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->accountRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -44,9 +44,7 @@ use SP\Infrastructure\File\FileException;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Class AccountAclService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountAcl
|
||||
*/
|
||||
final class AccountAcl extends Service implements AccountAclService
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -35,7 +35,7 @@ use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AccountCacheService
|
||||
* Class AccountCache
|
||||
*/
|
||||
final class AccountCache extends Service implements AccountCacheService
|
||||
{
|
||||
|
||||
@@ -47,9 +47,7 @@ use function SP\__u;
|
||||
use function SP\logger;
|
||||
|
||||
/**
|
||||
* Class AccountCryptService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountCrypt
|
||||
*/
|
||||
final class AccountCrypt extends Service implements AccountCryptService
|
||||
{
|
||||
@@ -119,7 +117,7 @@ final class AccountCrypt extends Service implements AccountCryptService
|
||||
/**
|
||||
* @param Account[] $accounts
|
||||
* @param callable $passUpdater
|
||||
* @param \SP\Domain\Crypt\Dtos\UpdateMasterPassRequest $updateMasterPassRequest
|
||||
* @param UpdateMasterPassRequest $updateMasterPassRequest
|
||||
*
|
||||
* @return EventMessage
|
||||
*/
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\File;
|
||||
use SP\DataModel\FileExtData;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Models\File;
|
||||
use SP\Domain\Account\Models\FileExtData;
|
||||
use SP\Domain\Account\Ports\AccountFileRepository;
|
||||
use SP\Domain\Account\Ports\AccountFileService;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\InvalidImageException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -44,9 +44,7 @@ use SP\Util\ImageUtilInterface;
|
||||
use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class AccountFileService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountFile
|
||||
*/
|
||||
final class AccountFile extends Service implements AccountFileService
|
||||
{
|
||||
@@ -139,11 +137,11 @@ final class AccountFile extends Service implements AccountFileService
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $searchData
|
||||
* @param ItemSearchDto $searchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $searchData): QueryResult
|
||||
public function search(ItemSearchDto $searchData): QueryResult
|
||||
{
|
||||
return $this->accountFileRepository->search($searchData);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Dtos\AccountHistoryCreateDto;
|
||||
use SP\Domain\Account\Dtos\EncryptedPassword;
|
||||
use SP\Domain\Account\Models\AccountHistory as AccountHistoryModel;
|
||||
@@ -33,6 +32,7 @@ use SP\Domain\Account\Ports\AccountHistoryRepository;
|
||||
use SP\Domain\Account\Ports\AccountHistoryService;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
|
||||
use SP\Infrastructure\Database\QueryResult;
|
||||
@@ -40,9 +40,7 @@ use SP\Infrastructure\Database\QueryResult;
|
||||
use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class AccountHistoryService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountHistory
|
||||
*/
|
||||
final class AccountHistory extends Service implements AccountHistoryService
|
||||
{
|
||||
@@ -86,11 +84,11 @@ final class AccountHistory extends Service implements AccountHistoryService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->accountHistoryRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -40,7 +40,7 @@ use SP\Domain\Core\Exceptions\SPException;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Class AccountItemsService
|
||||
* Class AccountItems
|
||||
*/
|
||||
final class AccountItems extends Service implements AccountItemsService
|
||||
{
|
||||
|
||||
@@ -43,8 +43,6 @@ use SP\Mvc\Controller\Validators\ValidatorInterface;
|
||||
|
||||
/**
|
||||
* Class AccountPreset
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
*/
|
||||
final class AccountPreset extends Service implements AccountPresetService
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ use SP\Util\Filter;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Class AccountSearchService
|
||||
* Class AccountSearch
|
||||
*/
|
||||
final class AccountSearch extends Service implements AccountSearchService
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -33,9 +33,7 @@ use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AccountFavoriteService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountToFavorite
|
||||
*/
|
||||
final class AccountToFavorite extends Service implements AccountToFavoriteService
|
||||
{
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Ports\AccountToTagRepository;
|
||||
use SP\Domain\Account\Ports\AccountToTagService;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Common\Models\Simple;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
@@ -35,9 +35,7 @@ use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AccountToTagService
|
||||
*
|
||||
* @package SP\Domain\Account\Services
|
||||
* Class AccountToTag
|
||||
*/
|
||||
final class AccountToTag extends Service implements AccountToTagService
|
||||
{
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Ports\AccountToUserRepository;
|
||||
use SP\Domain\Account\Ports\AccountToUserService;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AccountToUserService
|
||||
* Class AccountToUser
|
||||
*/
|
||||
final class AccountToUser extends Service implements AccountToUserService
|
||||
{
|
||||
|
||||
@@ -25,16 +25,16 @@
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Account\Ports\AccountToUserGroupRepository;
|
||||
use SP\Domain\Account\Ports\AccountToUserGroupService;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AccountToUserGroupService
|
||||
* Class AccountToUserGroup
|
||||
*/
|
||||
final class AccountToUserGroup extends Service implements AccountToUserGroupService
|
||||
{
|
||||
|
||||
@@ -28,19 +28,18 @@ use Defuse\Crypto\Exception\CryptoException;
|
||||
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Crypt\Vault;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\DataModel\PublicLinkList;
|
||||
use SP\Domain\Account\Dtos\PublicLinkKey;
|
||||
use SP\Domain\Account\Models\PublicLink as PublicLinkModel;
|
||||
use SP\Domain\Account\Models\PublicLinkList;
|
||||
use SP\Domain\Account\Ports\AccountService;
|
||||
use SP\Domain\Account\Ports\PublicLinkRepository;
|
||||
use SP\Domain\Account\Ports\PublicLinkService;
|
||||
use SP\Domain\Common\Models\Simple;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Common\Services\ServiceItemTrait;
|
||||
use SP\Domain\Config\Ports\ConfigFileService;
|
||||
use SP\Domain\Core\Crypt\CryptInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\CryptException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -53,14 +52,10 @@ use SP\Infrastructure\Database\QueryResult;
|
||||
use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class PublicLinkService
|
||||
*
|
||||
* @package SP\Domain\Common\Services\PublicLink
|
||||
* Class PublicLink
|
||||
*/
|
||||
final class PublicLink extends Service implements PublicLinkService
|
||||
{
|
||||
use ServiceItemTrait;
|
||||
|
||||
/**
|
||||
* Tipos de enlaces
|
||||
*/
|
||||
@@ -93,11 +88,11 @@ final class PublicLink extends Service implements PublicLinkService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->publicLinkRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass 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.
|
||||
*
|
||||
* sysPass 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 sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\Domain\Account\Services;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\DataModel\PublickLinkOldData;
|
||||
use SP\Domain\Account\Models\PublicLink;
|
||||
use SP\Domain\Account\Ports\PublicLinkRepository;
|
||||
use SP\Domain\Account\Ports\UpgradePublicLinkService;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Util\Util;
|
||||
|
||||
use function SP\__u;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Class UpgradePublicLink
|
||||
*
|
||||
* @package SP\Domain\Upgrade\Services
|
||||
*/
|
||||
final class UpgradePublicLink extends Service implements UpgradePublicLinkService
|
||||
{
|
||||
public function __construct(
|
||||
Application $application,
|
||||
private readonly PublicLinkRepository $publicLinkRepository
|
||||
) {
|
||||
parent::__construct($application);
|
||||
}
|
||||
|
||||
public function upgradeV300B18010101(): void
|
||||
{
|
||||
$this->eventDispatcher->notify(
|
||||
'upgrade.publicLink.start',
|
||||
new Event(
|
||||
$this,
|
||||
EventMessage::factory()
|
||||
->addDescription(__u('Public links update'))
|
||||
->addDescription(__FUNCTION__)
|
||||
)
|
||||
);
|
||||
|
||||
try {
|
||||
$this->publicLinkRepository->transactionAware(
|
||||
function () {
|
||||
$items = $this->publicLinkRepository->getAny(['id', 'data'], 'PublicLink')->getDataAsArray();
|
||||
|
||||
foreach ($items as $item) {
|
||||
$data = Util::unserialize(
|
||||
PublickLinkOldData::class,
|
||||
$item['data'],
|
||||
PublicLink::class
|
||||
);
|
||||
|
||||
$itemData = new PublicLink([
|
||||
'id' => $item['id'],
|
||||
'itemId' => $data->getItemId(),
|
||||
'hash' => $data->getLinkHash(),
|
||||
'userId' => $data->getUserId(),
|
||||
'typeId' => $data->getTypeId(),
|
||||
'notify' => $data->isNotify(),
|
||||
'dateAdd' => $data->getDateAdd(),
|
||||
'dateExpire' => $data->getDateExpire(),
|
||||
'countViews' => $data->getCountViews(),
|
||||
'maxCountViews' => $data->getMaxCountViews(),
|
||||
'useInfo' => serialize($data->getUseInfo()),
|
||||
'data' => $data->getData(),
|
||||
]);
|
||||
|
||||
$this->publicLinkRepository->update($itemData);
|
||||
|
||||
$this->eventDispatcher->notify(
|
||||
'upgrade.publicLink.process',
|
||||
new Event(
|
||||
$this,
|
||||
EventMessage::factory()
|
||||
->addDescription(__u('Link updated'))
|
||||
->addDetail(__u('Link'), $item['id'])
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
$this
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notify('exception', new Event($e));
|
||||
}
|
||||
|
||||
$this->eventDispatcher->notify(
|
||||
'upgrade.publicLink.end',
|
||||
new Event(
|
||||
$this,
|
||||
EventMessage::factory()
|
||||
->addDescription(__u('Public links update'))
|
||||
->addDescription(__FUNCTION__)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,7 @@ namespace SP\Domain\Api\Dtos;
|
||||
use SP\Core\DataCollection;
|
||||
|
||||
/**
|
||||
* Class ApiData
|
||||
*
|
||||
* @package SP\Domain\Api\Services
|
||||
* Class ApiRequestData
|
||||
*/
|
||||
final class ApiRequestData extends DataCollection
|
||||
{
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace SP\Domain\Api\Dtos;
|
||||
|
||||
/**
|
||||
* Class ApiResponse
|
||||
*
|
||||
* @package SP\Api
|
||||
*/
|
||||
final class ApiResponse
|
||||
{
|
||||
|
||||
@@ -33,8 +33,6 @@ use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class ApiRequest
|
||||
*
|
||||
* @package SP\Domain\Api\Services
|
||||
*/
|
||||
final class ApiRequest implements ApiRequestService
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -28,8 +28,6 @@ use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class ApiRequestException
|
||||
*
|
||||
* @package SP\Domain\Api\Services
|
||||
*/
|
||||
final class ApiRequestException extends SPException
|
||||
{
|
||||
|
||||
@@ -31,8 +31,6 @@ use SP\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class JsonRpcResponse
|
||||
*
|
||||
* @package SP\Api
|
||||
*/
|
||||
final class JsonRpcResponse
|
||||
{
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
namespace SP\Domain\Auth\Ports;
|
||||
|
||||
use Exception;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Auth\Models\AuthToken as AuthTokenModel;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
|
||||
@@ -78,14 +78,14 @@ interface AuthTokenRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Creates an item
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace SP\Domain\Auth\Ports;
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
|
||||
use Exception;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Auth\Models\AuthToken as AuthTokenModel;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -49,7 +49,7 @@ interface AuthTokenService
|
||||
* @throws QueryException
|
||||
* @throws ConstraintException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* @throws ConstraintException
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -28,8 +28,6 @@ use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class AuthException
|
||||
*
|
||||
* @package SP\Domain\Auth\Services
|
||||
*/
|
||||
final class AuthException extends SPException
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@ use Exception;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Crypt\Hash;
|
||||
use SP\Core\Crypt\Vault;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Auth\Models\AuthToken as AuthTokenModel;
|
||||
use SP\Domain\Auth\Ports\AuthTokenRepository;
|
||||
use SP\Domain\Auth\Ports\AuthTokenService;
|
||||
@@ -39,6 +38,7 @@ use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Crypt\CryptInterface;
|
||||
use SP\Domain\Core\Crypt\VaultInterface;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\CryptException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
@@ -83,12 +83,12 @@ final class AuthToken extends Service implements AuthTokenService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
* @return QueryResult<T>
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->authTokenRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
namespace SP\Domain\Auth\Services;
|
||||
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Domain\Auth\Ports\AuthTokenActionInterface;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Domain\Core\Acl\AclInterface;
|
||||
@@ -32,9 +31,9 @@ use SP\Domain\Core\Acl\AclInterface;
|
||||
/**
|
||||
* Class AuthTokenAction
|
||||
*/
|
||||
final class AuthTokenAction implements AuthTokenActionInterface
|
||||
final readonly class AuthTokenAction implements AuthTokenActionInterface
|
||||
{
|
||||
public function __construct(private readonly AclInterface $acl)
|
||||
public function __construct(private AclInterface $acl)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
namespace SP\Domain\Category\Ports;
|
||||
|
||||
use Exception;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Category\Models\Category;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Infrastructure\Common\Repositories\DuplicatedItemException;
|
||||
@@ -114,10 +114,10 @@ interface CategoryRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult<T>
|
||||
* @throws Exception
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
namespace SP\Domain\Category\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Category\Models\Category;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -42,12 +42,12 @@ use SP\Infrastructure\Database\QueryResult;
|
||||
interface CategoryService
|
||||
{
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
* @return QueryResult<T>
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* @throws NoSuchItemException
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace SP\Domain\Category\Services;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Category\Models\Category as CategoryModel;
|
||||
use SP\Domain\Category\Ports\CategoryRepository;
|
||||
use SP\Domain\Category\Ports\CategoryService;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -56,11 +56,11 @@ final class Category extends Service implements CategoryService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
* @return QueryResult<T>
|
||||
* @throws Exception
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->categoryRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Client\Ports;
|
||||
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Ports\AccountFilterBuilder;
|
||||
use SP\Domain\Client\Models\Client as ClientModel;
|
||||
use SP\Domain\Common\Ports\Repository;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -98,11 +98,11 @@ interface ClientRepository extends Repository
|
||||
/**
|
||||
* Searches for items by a given filter
|
||||
*
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult<T>
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* Returns the item for given name
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
namespace SP\Domain\Client\Ports;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Client\Models\Client;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -44,7 +44,7 @@ interface ClientService
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult;
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult;
|
||||
|
||||
/**
|
||||
* @throws NoSuchItemException
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
namespace SP\Domain\Client\Services;
|
||||
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Domain\Account\Ports\AccountFilterBuilder;
|
||||
use SP\Domain\Client\Models\Client as ClientModel;
|
||||
use SP\Domain\Client\Ports\ClientRepository;
|
||||
@@ -33,6 +32,7 @@ use SP\Domain\Client\Ports\ClientService;
|
||||
use SP\Domain\Common\Models\Simple;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Core\Dtos\ItemSearchDto;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
use SP\Domain\Core\Exceptions\SPException;
|
||||
@@ -43,7 +43,7 @@ use SP\Infrastructure\Database\QueryResult;
|
||||
use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class ClientService
|
||||
* Class Client
|
||||
*
|
||||
* @template T of ClientModel
|
||||
*/
|
||||
@@ -58,11 +58,11 @@ final class Client extends Service implements ClientService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param ItemSearchDto $itemSearchData
|
||||
*
|
||||
* @return QueryResult<T>
|
||||
*/
|
||||
public function search(ItemSearchData $itemSearchData): QueryResult
|
||||
public function search(ItemSearchDto $itemSearchData): QueryResult
|
||||
{
|
||||
return $this->clientRepository->search($itemSearchData);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @noinspection PhpMultipleClassDeclarationsInspection */
|
||||
|
||||
namespace SP\Domain\Common\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @noinspection PhpMultipleClassDeclarationsInspection */
|
||||
|
||||
namespace SP\Domain\Common\Attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace SP\Domain\Common\Dtos;
|
||||
|
||||
use SP\DataModel\Item;
|
||||
use SP\Domain\Common\Models\Item;
|
||||
|
||||
/**
|
||||
* Trait ItemDataTrait
|
||||
@@ -32,7 +32,7 @@ use SP\DataModel\Item;
|
||||
trait ItemDataTrait
|
||||
{
|
||||
/**
|
||||
* @param Item[] $items
|
||||
* @param \SP\Domain\Common\Models\Item[] $items
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -22,15 +22,10 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
|
||||
use SP\Domain\Common\Models\ItemWithIdAndNameModel;
|
||||
use SP\Domain\Common\Models\Model;
|
||||
namespace SP\Domain\Common\Models;
|
||||
|
||||
/**
|
||||
* Class ItemData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
* Class Item
|
||||
*/
|
||||
class Item extends Model implements ItemWithIdAndNameModel
|
||||
{
|
||||
@@ -39,8 +39,6 @@ use function SP\logger;
|
||||
|
||||
/**
|
||||
* Class Service
|
||||
*
|
||||
* @package SP\Domain\Common\Services
|
||||
*/
|
||||
abstract class Service
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -28,8 +28,6 @@ use SP\Domain\Core\Exceptions\SPException;
|
||||
|
||||
/**
|
||||
* Class ServiceException
|
||||
*
|
||||
* @package SP\Domain\Common\Services
|
||||
*/
|
||||
final class ServiceException extends SPException
|
||||
{
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass 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.
|
||||
*
|
||||
* sysPass 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 sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\Domain\Common\Services;
|
||||
|
||||
/**
|
||||
* Trait ServiceItemTrait
|
||||
*
|
||||
* @package SP\Domain\Common\Services
|
||||
* @deprecated
|
||||
*/
|
||||
trait ServiceItemTrait
|
||||
{
|
||||
/**
|
||||
* Get all items from the service's repository
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
abstract public function getAll();
|
||||
}
|
||||
@@ -29,7 +29,7 @@ use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Util\VersionUtil;
|
||||
|
||||
/**
|
||||
* Class configData
|
||||
* Class ConfigData
|
||||
*/
|
||||
final class ConfigData extends DataCollection implements ConfigDataInterface
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel\Dto;
|
||||
namespace SP\Domain\Config\Dtos;
|
||||
|
||||
/**
|
||||
* Class ConfigRequest
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
namespace SP\Domain\Config\Ports;
|
||||
|
||||
use SP\DataModel\Dto\ConfigRequest;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Config\Dtos\ConfigRequest;
|
||||
use SP\Domain\Config\Models\Config;
|
||||
use SP\Domain\Core\Exceptions\ConstraintException;
|
||||
use SP\Domain\Core\Exceptions\QueryException;
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace SP\Domain\Config\Services;
|
||||
|
||||
use Exception;
|
||||
use SP\Core\Application;
|
||||
use SP\DataModel\Dto\ConfigRequest;
|
||||
use SP\Domain\Common\Services\Service;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Config\Dtos\ConfigRequest;
|
||||
use SP\Domain\Config\Models\Config as ConfigModel;
|
||||
use SP\Domain\Config\Ports\ConfigRepository;
|
||||
use SP\Domain\Config\Ports\ConfigService;
|
||||
|
||||
@@ -43,10 +43,10 @@ use function SP\processException;
|
||||
/**
|
||||
* Class ConfigBackup
|
||||
*/
|
||||
class ConfigBackup implements ConfigBackupService
|
||||
readonly class ConfigBackup implements ConfigBackupService
|
||||
{
|
||||
|
||||
public function __construct(private readonly ConfigService $configService)
|
||||
public function __construct(private ConfigService $configService)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ use function SP\logger;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Read and write the settings in the defined config file
|
||||
* Class ConfigFile
|
||||
*/
|
||||
class ConfigFile implements ConfigFileService
|
||||
{
|
||||
|
||||
@@ -33,8 +33,6 @@ use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class ConfigUtil
|
||||
*
|
||||
* @package Config
|
||||
*/
|
||||
final class ConfigUtil
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace SP\Domain\Core\Acl;
|
||||
|
||||
use SP\DataModel\Action;
|
||||
use SP\Domain\Core\Models\Action;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -31,8 +31,6 @@ use function SP\__u;
|
||||
|
||||
/**
|
||||
* Class UnauthorizedActionException
|
||||
*
|
||||
* @package SP\Core\Acl
|
||||
*/
|
||||
final class UnauthorizedActionException extends SPException
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,13 +27,13 @@ namespace SP\Domain\Core\Bootstrap;
|
||||
/**
|
||||
* Class RouteContextData
|
||||
*/
|
||||
final class RouteContextData
|
||||
final readonly class RouteContextData
|
||||
{
|
||||
public function __construct(
|
||||
private readonly string $controller,
|
||||
private readonly string $actionName,
|
||||
private readonly string $methodName,
|
||||
private readonly array $methodParams
|
||||
private string $controller,
|
||||
private string $actionName,
|
||||
private string $methodName,
|
||||
private array $methodParams
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -22,14 +22,14 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
namespace SP\Domain\Core\Dtos;
|
||||
|
||||
use SP\Util\Filter;
|
||||
|
||||
/**
|
||||
* Class ItemSearchData
|
||||
* Class ItemSearchDto
|
||||
*/
|
||||
class ItemSearchData
|
||||
class ItemSearchDto
|
||||
{
|
||||
public function __construct(
|
||||
private ?string $seachString = null,
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2024, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -27,13 +27,13 @@ namespace SP\Domain\Core\File;
|
||||
/**
|
||||
* Class MimeType
|
||||
*/
|
||||
final class MimeType
|
||||
final readonly class MimeType
|
||||
{
|
||||
|
||||
public function __construct(
|
||||
private readonly string $type,
|
||||
private readonly string $description,
|
||||
private readonly string $extension
|
||||
private string $type,
|
||||
private string $description,
|
||||
private string $extension
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -22,22 +22,20 @@
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\DataModel;
|
||||
namespace SP\Domain\Core\Models;
|
||||
|
||||
use SP\Domain\Common\Models\ItemWithIdAndNameModel;
|
||||
|
||||
/**
|
||||
* Class ActionData
|
||||
*
|
||||
* @package SP\DataModel
|
||||
* Class Action
|
||||
*/
|
||||
class Action implements ItemWithIdAndNameModel
|
||||
readonly class Action implements ItemWithIdAndNameModel
|
||||
{
|
||||
public function __construct(
|
||||
private readonly int $id,
|
||||
private readonly string $name,
|
||||
private readonly string $text,
|
||||
private readonly string $route
|
||||
private int $id,
|
||||
private string $name,
|
||||
private string $text,
|
||||
private string $route
|
||||
) {
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user