Add step.

@param Step $step

@return Path
428202
public function addStep(Step $step)
    {
        if (!$this->steps->contains($step)) {
            $this->steps->add($step);
        }

        return $this;
    }
380869
protected function invokeStep(Step $step, Bootstrap $bootstrap)
    {
        $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', [$step, $this->identifier]);
        $identifier = $step->getIdentifier();
        $step($bootstrap);
        $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', [$step, $this->identifier]);
        if (isset($this->steps[$identifier])) {
            foreach ($this->steps[$identifier] as $followingStep) {
                $this->invokeStep($followingStep, $bootstrap);
            }
        }
    }
124701
public function increment($table, $column, $step = 1)
    {
        $this->queryBuilder->increment($table, $column, $step);
        return $this;
    }
45590
public function increment(string $key, int $step = 1): int {
		return $this->driver->increment($key, abs($step));
	}
49717
protected function runStep($step, $pretend = false)
    {
        try
        {
            $step = $this->createStep($step);

            if ($this->confirm($step->prompt(), true))
            {
                return $step->run($pretend);
            }
        }
        catch (\Exception $e)
        {
            $this->error($e->getMessage());
        }

        return false;
    }
922721
public function initStep($step)
    {
        $step_method = 'step_'.$step;
        /** @type H1 $h */
        $h = $this->add('H1');
        if (!$this->hasMethod($step_method)) {
            return $h->set('No such step');
        }
        $h->set('Step '.$this->s_cnt.': '.$this->s_title);
        $page = $this->makePage($step);

        return $this->$step_method($page);
    }
1201538
public function setParent(Step $parent = null)
    {
        if ($parent !== $this->parent) {
            $this->parent = $parent;

            if (null !== $parent) {
                $parent->addChild($this);
            }
        }

        return $this;
    }
7985
public function increment($key, $step = 1)
    {
        $success = false;

        return wincache_ucache_inc($this->prefixKey . $key, $step, $success);
    }
72012
protected function stepExist($step)
    {
        return isset($this->steps[$step]) && class_exists($this->steps[$step]);
    }
329865
public static function nextStep($step)
    {
        $steps = self::getSteps();
        $key = self::getStepIndex($step) + 1;
        if (key_exists($key, $steps)) {
            return $steps[$key];
        } else {
            return null;
        }
    }
550466
public function increment($key, $step = 1)
    {
        $value = $this->get($key);
        $this->set($key, $value + $step);
    }
967917
public function run($step = 'add')
    {
        $this->setLogs($step, 'step');
        switch ($step) {
            // Step 1: Validate and add a contact to a queue for the next file for the client.
            case 'add':
                $this->getFieldValues();
                $this->fileEntitySelect(true);
                $this->fileEntityRefreshSettings();
                $this->addContactToQueue();
                break;

            // Step 3: Build the file (if a good time), performing a second validation on each contact.
            case 'build':
                if ($this->test) {
                    $this->getFieldValues();
                }
                $this->fileEntitySelect();
                $this->evaluateSchedule(true);
                $this->fileEntityRefreshSettings();
                $this->fileBuild();
                break;

            // Step 4: Perform file send operations, if any are configured.
            case 'send':
                $this->fileEntitySelect(false, File::STATUS_READY);
                $this->evaluateSchedule(true);
                $this->fileSend();
                break;
        }

        return $this;
    }
1345569
public function up(Table $table, $id, $step = 1)
    {
        return $this->_move($table, $id, $step);
    }
357189
protected function create($step)
    {
        foreach (array('name', 'identifier') as $key) {
            if (!isset($step->dsl[$key])) {
                throw new \Exception("The '$key' key is missing in a section creation definition");
            }
        }

        $sectionService = $this->repository->getSectionService();

        $sectionCreateStruct = $sectionService->newSectionCreateStruct();

        $sectionIdentifier = $this->referenceResolver->resolveReference($step->dsl['identifier']);
        $sectionCreateStruct->identifier = $sectionIdentifier;
        $sectionCreateStruct->name = $this->referenceResolver->resolveReference($step->dsl['name']);

        $section = $sectionService->createSection($sectionCreateStruct);

        $this->setReferences($section, $step);

        return $section;
    }
668450
protected function processStep(Node\Step $step)
    {
        $result = [
            'keyword' => $step->getKeyword(),
            'name' => $step->getName(),
            'line' => $step->getLine(),
            'match' => $step->getMatch(),
            'result' => $step->getProcessedResult(),
            'arguments' => $this->processArguments($step->getArguments()),
        ];

        if (count($step->getEmbeddings())) {
            $result['embeddings'] = $step->getEmbeddings();
        }

        return $result;
    }
86853
public function increment($key, $step)
    {
        $value = $this->getValueByKey($key, false);
        $this->alter($key, $value + $step);
    }
579095
protected function create($step)
    {
        $locationService = $this->repository->getLocationService();

        if (!isset($step->dsl['parent_location']) && !isset($step->dsl['parent_location_id'])) {
            throw new \Exception('Missing parent location id. This is required to create the new location.');
        }

        // support legacy tag: parent_location_id
        if (!isset($step->dsl['parent_location']) && isset($step->dsl['parent_location_id'])) {
            $parentLocationIds = $step->dsl['parent_location_id'];
        } else {
            $parentLocationIds = $step->dsl['parent_location'];
        }

        if (!is_array($parentLocationIds)) {
            $parentLocationIds = array($parentLocationIds);
        }

        if (isset($step->dsl['is_main']) && count($parentLocationIds) > 1) {
            throw new \Exception('Can not set more than one new location as main.');
        }

        // resolve references and remote ids
        foreach ($parentLocationIds as $id => $parentLocationId) {
            $parentLocationId = $this->referenceResolver->resolveReference($parentLocationId);
            $parentLocationIds[$id] = $this->matchLocationByKey($parentLocationId)->id;
        }

        $contentCollection = $this->matchContents('create', $step);

        $locations = array();
        foreach ($contentCollection as $content) {
            $contentInfo = $content->contentInfo;

            foreach ($parentLocationIds as $parentLocationId) {
                $locationCreateStruct = $locationService->newLocationCreateStruct($parentLocationId);

                if (isset($step->dsl['is_hidden'])) {
                    $locationCreateStruct->hidden = $this->referenceResolver->resolveReference($step->dsl['is_hidden']);
                }

                if (isset($step->dsl['priority'])) {
                    $locationCreateStruct->priority = $this->referenceResolver->resolveReference($step->dsl['priority']);
                }

                if (isset($step->dsl['sort_order'])) {
                    $locationCreateStruct->sortOrder = $this->getSortOrder($this->referenceResolver->resolveReference($step->dsl['sort_order']));
                }

                if (isset($step->dsl['sort_field'])) {
                    $locationCreateStruct->sortField = $this->getSortField($this->referenceResolver->resolveReference($step->dsl['sort_field']));
                }

                if (isset($step->dsl['remote_id'])) {
                    $locationCreateStruct->remoteId = $this->referenceResolver->resolveReference($step->dsl['remote_id']);
                }

                $location = $locationService->createLocation($contentInfo, $locationCreateStruct);

                if (isset($step->dsl['is_main'])) {
                    $this->setMainLocation($location);
                    // we have to reload the location so that correct data can be set as reference
                    $location = $locationService->loadLocation($location->id);
                }

                $locations[] = $location;
            }
        }

        $locationCollection = new LocationCollection($locations);

        $this->setReferences($locationCollection, $step);

        return $locationCollection;
    }