/** * Update payload with new state data * * @param StateInterface $state * @param PayloadInterface $payload */ private function updatePayload(StateInterface $state, PayloadInterface $payload) { $payload->setState($state->getName()); foreach ((array) $state->getFlags() as $flag) { $payload->setFlag($flag); } }
/** * Create state for dot notation * * @param Document $document * @param StateInterface $state */ private function addState(Document $document, StateInterface $state) { $document->addState(new Node($state->getName(), $state->getFlags(), $this->stylist->getStyle('state', $state->getName()), $state->getAttributes()->get('comment'))); }