ArticleDb.php 477 Bytes
Newer Older
1 2
<?php

3
namespace yiiunit\data\ar\sphinx;
4

5
use yii\sphinx\ActiveQuery;
6
use yiiunit\data\ar\ActiveRecord as ActiveRecordDb;
7

8
class ArticleDb extends ActiveRecordDb
9
{
10 11 12 13
    public static function tableName()
    {
        return 'yii2_test_article';
    }
14

15 16
    public function getIndex()
    {
Qiang Xue committed
17
        return new ActiveQuery(ArticleIndex::className(), [
18 19 20
            'primaryModel' => $this,
            'link' => ['id' => 'id'],
            'multiple' => false,
Qiang Xue committed
21
        ]);
22
    }
AlexGx committed
23
}