/** * Read from a string and create an array * * @param string $string String * * @return array|bool */ public function fromString($string) { $key = $this->generateKey($string); if ($this->storage->hasItem($key)) { return $this->storage->getItem($key); } $config = $this->reader->fromString($string); $this->storage->setItem($key, $config); return $config; }
public function testFromEmptyString() { $config = $this->reader->fromString(''); $this->assertTrue(!$config); }