Imbo\Model\ArrayModel::setTitle PHP Method

setTitle() public method

Set the title of the model
public setTitle ( string $title ) : ArrayModel
$title string The title of the model, for instance "Statistics"
return ArrayModel
    public function setTitle($title)
    {
        $this->title = $title;
        return $this;
    }

Usage Example

示例#1
0
 /**
  * @covers Imbo\Model\ArrayModel::setTitle
  * @covers Imbo\Model\ArrayModel::getTitle
  */
 public function testCanSetAndGetTitle()
 {
     $this->assertNull($this->model->getTitle());
     $this->assertSame($this->model, $this->model->setTitle('title'));
     $this->assertSame('title', $this->model->getTitle());
 }