tableName() public method

public tableName ( ) : string
return 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
ファイル: PostQuery.php プロジェクト: jorry2008/turen
 /**
  * @return \common\models\cms\PostQuery
  */
 public function active()
 {
     $this->andWhere([Post::tableName() . '.status' => 1, Post::tableName() . '.deleted' => 0]);
     //双[[]]表示and
     return $this;
 }