toString() public method

Will use $format as an template and substitute {{key}} for attributes
public toString ( string $format = '' ) : string
$format string Format
return string
示例#1
0
 /**
  * Test
  *
  * @return void
  */
 public function testToStringWithFormat()
 {
     $this->object->setData(array('a' => 'b', 'c' => 'd'));
     $this->assertEquals('b d', $this->object->toString('{{a}} {{c}}'));
 }