Gc\View\Model::init PHP Method

init() public method

Initiliaze
public init ( integer $id = null ) : Model
$id integer View id
return Model
    public function init($id = null)
    {
        $this->setId($id);
    }

Usage Example

コード例 #1
0
ファイル: ModelTest.php プロジェクト: gotcms/gotcms
 /**
  * Test
  *
  * @return void
  */
 public function testInit()
 {
     $this->object->init(1);
     $this->assertEquals(1, $this->object->getId());
 }