41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Lts\Customer\Console\Command;
|
|
|
|
use Lts\Sales\Helper\Email;
|
|
use Lts\Sales\Helper\CredisStorage;
|
|
use Magento\Framework\Api\SearchCriteriaBuilderFactory;
|
|
use Magento\Framework\App\Area;
|
|
use Magento\Framework\Exception\LocalizedException;
|
|
use Magento\Framework\Exception\MailException;
|
|
use Magento\InventoryApi\Api\Data\SourceItemInterface;
|
|
use Magento\InventoryApi\Api\SourceItemRepositoryInterface;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Magento\InventoryApi\Api\GetSourceItemsBySkuInterface;
|
|
use Magento\Framework\App\State;
|
|
|
|
|
|
class Test extends \Symfony\Component\Console\Command\Command
|
|
{
|
|
public function __construct(
|
|
protected SourceItemRepositoryInterface $sourceItemRepository,
|
|
protected SearchCriteriaBuilderFactory $searchCriteriaBuilderFactory,
|
|
protected GetSourceItemsBySkuInterface $getSourceItemsBySku,
|
|
protected Email $email,
|
|
protected State $state,
|
|
protected CredisStorage $credis
|
|
) {
|
|
parent::__construct('test');
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$this->credis->set('lts_test', ['abc', 'cde', 'cde']);
|
|
|
|
var_dump($this->credis->isExist('lts_test', 'cde'));
|
|
var_dump($this->credis->get('lts_test'));
|
|
var_dump($this->credis->get('lts_test1'));
|
|
return 0;
|
|
}
|
|
} |