tableName() 공개 메소드

public tableName ( ) : string
리턴 string the associated database table name
예제 #1
0
 public function testTableNameByThis()
 {
     $post = new Post();
     $table_name = $post->tableName();
     $this->assertSame($table_name, 'post');
 }
예제 #2
0
 /**
  * @return \common\models\cms\PostQuery
  */
 public function active()
 {
     $this->andWhere([Post::tableName() . '.status' => 1, Post::tableName() . '.deleted' => 0]);
     //双[[]]表示and
     return $this;
 }