Gc\View\Model::init PHP 메소드

init() 공개 메소드

Initiliaze
public init ( integer $id = null ) : Model
$id integer View id
리턴 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());
 }