Example #1
0
 /**
  * @inheritdoc
  */
 public function push()
 {
     $frame = $this->factory->createFrame($this->end());
     array_push($this->stack, $frame);
     $this->size++;
     return $frame;
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function parse($data)
 {
     $this->stack = $this->stackFactory->createStack();
     $rootFrame = $this->stack->push();
     $rootFrame->setRelationship($this->schemaFactory->createRelationshipObject(null, $data, [], null, true, true));
     foreach ($this->parseData() as $parseReply) {
         (yield $parseReply);
     }
     $this->stack = null;
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function parse($data)
 {
     assert('is_array($data) || is_object($data) || is_null($data)');
     $this->stack = $this->stackFactory->createStack();
     $this->stack->push();
     foreach ($this->parseData($data) as $parseReply) {
         (yield $parseReply);
     }
     $this->stack = null;
 }