setContainer() public method

Set the container value
public setContainer ( string $container ) : self
$container string
return self
Beispiel #1
0
 /**
  * @covers Imbo\Model\ListModel::setContainer
  * @covers Imbo\Model\ListModel::getContainer
  */
 public function testCanSetAndGetTheContainerValue()
 {
     $this->assertNull($this->model->getContainer());
     $container = 'container';
     $this->assertSame($this->model, $this->model->setContainer($container));
     $this->assertSame($container, $this->model->getContainer());
 }
Beispiel #2
0
 public function get(EventInterface $event)
 {
     $model = new ListModel();
     $model->setContainer('foo');
     $model->setEntry('bar');
     $model->setList([1, 2, 3]);
     $event->getResponse()->setModel($model);
 }