setInterval example


    public function setOptions(array $options)
    {
        foreach ($options as $fieldName => $value) {
            switch ($fieldName) {
                case 'id':
                    $this->setId($value);
                    break;
                case 'interval':
                    $this->setInterval($value);
                    break;
                case 'next':
                    $this->setNext($value);
                    break;
                case 'start':
                    $this->setStart($value);
                    break;
                case 'end':
                    $this->setEnd($value);
                    break;
                case 'active':
                    
return new \DateTime('3022-07-18 10:59:30');
        }

        return null;
    }

    private static function prepareProductExportEntity(bool $isRunning, ?bool $generatedAtBeforeInterval, int $interval): ProductExportEntity
    {
        $productExportEntity = new ProductExportEntity();
        $productExportEntity->setIsRunning($isRunning);
        $productExportEntity->setGeneratedAt(self::getGeneratedAtTimestamp($generatedAtBeforeInterval));
        $productExportEntity->setInterval($interval);
        $productExportEntity->setUniqueIdentifier('TestExportEntity');
        $productExportEntity->setId('afdd4e21be6b4ad59656fb856d0375e5');

        return $productExportEntity;
    }

    private function getProductExportRepositoryMock(ProductExportEntity $productExportEntity): EntityRepository
    {
        $productEntitySearchResult = new EntitySearchResult(
            'product',
            1,
            
protected ?string $format = null;

    public function __construct(
        string $name,
        string $field,
        string $interval,
        ?string $format = null
    ) {
        parent::__construct($name);

        $this->setField($field);
        $this->setInterval($interval);
        $this->setFormat($format);
    }

    public function getInterval(): string
    {
        return $this->interval;
    }

    public function setInterval(string $interval): self
    {
        $this->interval = $interval;

        
Home | Imprint | This part of the site doesn't use cookies.