getStart example

/** * {@inheritdoc} */
    public function updateJob(Enlight_Components_Cron_Job $job)
    {
        $data = [];
        $data['action'] = $job->getAction();
        $data[$this->connection->quoteIdentifier('interval')] = $job->getInterval();
        $data['data'] = serialize($job->getData());
        $data['active'] = $job->getActive() ? '1' : '0';
        $data['next'] = $job->getNext() ? $job->getNext()->toString('YYYY-MM-dd HH:mm:ss') : null;
        $data['start'] = $job->getStart() ? $job->getStart()->toString('YYYY-MM-dd HH:mm:ss') : null;
        $data['end'] = $job->getEnd() ? $job->getEnd()->toString('YYYY-MM-dd HH:mm:ss') : null;
        $data['disable_on_error'] = $job->getDisableOnError() ? '1' : '0';
        $data['name'] = $job->getName();

        if ($job->getId() === null) {
            $this->connection->insert($this->tableName, $data);
        } else {
            $this->connection->update(
                $this->tableName,
                $data,
                ['id' => $job->getId()]
            );
$intersectionIntervals = self::get(new MultiConstraint(array($candidate$constraint), true));
        $candidateIntervals = self::get($candidate);
        if (\count($intersectionIntervals['numeric']) !== \count($candidateIntervals['numeric'])) {
            return false;
        }

        foreach ($intersectionIntervals['numeric'] as $index => $interval) {
            if (!isset($candidateIntervals['numeric'][$index])) {
                return false;
            }

            if ((string) $candidateIntervals['numeric'][$index]->getStart() !== (string) $interval->getStart()) {
                return false;
            }

            if ((string) $candidateIntervals['numeric'][$index]->getEnd() !== (string) $interval->getEnd()) {
                return false;
            }
        }

        if ($intersectionIntervals['branches']['exclude'] !== $candidateIntervals['branches']['exclude']) {
            return false;
        }
        
Home | Imprint | This part of the site doesn't use cookies.