public function testIsObject() { $definition = new Definition(); $definition->addProperty('foo', $this->getDefinitionMock()); $this->assertFalse($definition->isScalar()); $this->assertFalse($definition->isArray()); $this->assertTrue($definition->isObject()); }
/** * Fetch context content * * @return mixed */ public function fetch() { if ($this->definition->isScalar()) { $this->definition->settle($this->origin, $this->content); return $this->content; } if ($this->definition->isArray()) { $this->definition->settle($this->origin, $this->collection); return $this->collection; } if ($this->definition->isObject()) { $this->definition->settle($this->origin, $this->object); return $this->object; } return null; }