decode() public method

Decode the object from string.
public decode ( string $str ) : mixed
$str string
return mixed
Ejemplo n.º 1
0
 /**
  * @dataProvider parsersProvider
  */
 public function testApiDecode_ReturnsEmptyString(ParserInterface $parser)
 {
     $this->assertEquals('', $parser->decode($this->getString()));
 }
Ejemplo n.º 2
0
 /**
  * @override
  * @inheritDoc
  */
 public function decode($str)
 {
     return $this->protocol->setAll($this->parser->decode($str));
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider objectParsersProvider
  */
 public function testCaseParser_EncodesThenDecodesDataProperly_ForObjectParsers(ParserInterface $parser)
 {
     $data = $this->getObject();
     $this->assertEquals($data, $parser->decode($parser->encode($data)));
 }