sphinx\ActiveRecord populateRecord()

populateRecord() public static method Populates an active record object using a row of data from the database/storage. This is an internal method meant to be called to create active record objects after fetching data from the database. It is mainly used by yii\sphinx\ActiveQuery to populate the query results into active records. When calling this method manually you should call afterFind() on the created record to trigger the afterFind Event. public static void populateRecord ( $record, $

sphinx\ActiveRecord isTransactional()

isTransactional() public method Returns a value indicating whether the specified operation is transactional in the current $scenario. public boolean isTransactional ( $operation )$operation integer The operation to check. Possible values are OP_INSERT, OP_UPDATE and OP_DELETE. return boolean Whether the specified operation is transactional in the current $scenario.

sphinx\ActiveRecord insert()

insert() public method Inserts a row into the associated Sphinx index using the attribute values of this record. This method performs the following steps in order: call beforeValidate() when $runValidation is true. If validation fails, it will skip the rest of the steps; call afterValidate() when $runValidation is true. call beforeSave(). If the method returns false, it will skip the rest of the steps; insert the record into index. If this fails, it will skip the rest of the steps; call aft

sphinx\ActiveRecord indexName()

indexName() public static method Declares the name of the Sphinx index associated with this AR class. By default this method returns the class name as the index name by calling yii\helpers\Inflector::camel2id(). For example, 'Article' becomes 'article', and 'StockItem' becomes 'stock_item'. You may override this method if the index is not named after this convention. public static string indexName ( )return string The index name

sphinx\ActiveRecord getSnippetSource()

getSnippetSource() public method Returns the string, which should be used as a source to create snippet for this Active Record instance. Child classes must implement this method to return the actual snippet source text. For example: public function getSnippetSource() { return $this->snippetSourceRelation->content; } public string getSnippetSource ( )return string Snippet source string. throws yii\base\NotSupportedException if this is not supported by the Active Record class

sphinx\ActiveRecord getSnippet()

getSnippet() public method Returns current snippet value or generates new one from given match. public string getSnippet ( $match = null, $options = [] )$match string Snippet source query $options array List of options in format: optionName => optionValue return string Snippet value

sphinx\ActiveRecord getIndexSchema()

getIndexSchema() public static method Returns the schema information of the Sphinx index associated with this AR class. public static yii\sphinx\IndexSchema getIndexSchema ( )return yii\sphinx\IndexSchema The schema information of the Sphinx index associated with this AR class. throws yii\base\InvalidConfigException if the index for the AR class does not exist.

sphinx\ActiveRecord getDb()

getDb() public static method Returns the Sphinx connection used by this AR class. By default, the "sphinx" application component is used as the Sphinx connection. You may override this method if you want to use a different Sphinx connection. public static yii\sphinx\Connection getDb ( )return yii\sphinx\Connection The Sphinx connection used by this AR class.

sphinx\ActiveRecord findBySql()

findBySql() public static method Creates an yii\sphinx\ActiveQuery instance with a given SQL statement. Note that because the SQL statement is already specified, calling additional query modification methods (such as where(), order()) on the created yii\sphinx\ActiveQuery instance will have no effect. However, calling with(), asArray() or indexBy() is still fine. Below is an example: $customers = Article::findBySql("SELECT * FROM `idx_article` WHERE MATCH('development')")->all(); publ

sphinx\ActiveRecord find()

find() public static method Creates an \yii\sphinx\ActiveQueryInterface instance for query purpose. The returned \yii\sphinx\ActiveQueryInterface instance can be further customized by calling methods defined in \yii\sphinx\ActiveQueryInterface before one() or all() is called to return populated ActiveRecord instances. For example, // find the customer whose ID is 1 $customer = Customer::find()->where(['id' => 1])->one(); // find all active customers and order them by their age: $c