Class yii\sphinx\IndexSchema

Inheritanceyii\sphinx\IndexSchema » yii\base\BaseObject
Available since extension's version2.0
Source Code https://github.com/yiisoft/yii2-sphinx/blob/master/src/IndexSchema.php

IndexSchema represents the metadata of a Sphinx index.

Public Properties

Hide inherited properties

Property Type Description Defined By
$columnNames array List of column names. yii\sphinx\IndexSchema
$columns yii\sphinx\ColumnSchema[] Column metadata of this index. yii\sphinx\IndexSchema
$isRt boolean Whether this index is a real-time index. yii\sphinx\IndexSchema
$isRuntime boolean Whether this index is a real-time index. yii\sphinx\IndexSchema
$name string Name of this index. yii\sphinx\IndexSchema
$primaryKey string Primary key of this index. yii\sphinx\IndexSchema
$type string Type of the index. yii\sphinx\IndexSchema

Public Methods

Hide inherited methods

Method Description Defined By
getColumn() Gets the named column metadata. yii\sphinx\IndexSchema
getColumnNames() Returns the names of all columns in this table. yii\sphinx\IndexSchema
isIsRuntime() yii\sphinx\IndexSchema
setIsRuntime() yii\sphinx\IndexSchema

Property Details

Hide inherited properties

$columnNames public property

List of column names.

public array $columnNames null
$columns public property

Column metadata of this index. Each array element is a yii\sphinx\ColumnSchema object, indexed by column names.

$isRt public property

Whether this index is a real-time index.

public boolean $isRt null
$isRuntime public property

Whether this index is a real-time index.

public boolean $isRuntime null
$name public property

Name of this index.

public string $name null
$primaryKey public property

Primary key of this index.

public string $primaryKey null
$type public property

Type of the index.

public string $type null

Method Details

Hide inherited methods

getColumn() public method

Gets the named column metadata.

This is a convenient method for retrieving a named column even if it does not exist.

public yii\sphinx\ColumnSchema getColumn ( $name )
$name string

Column name

return yii\sphinx\ColumnSchema

Metadata of the named column. Null if the named column does not exist.

                public function getColumn($name)
{
    return isset($this->columns[$name]) ? $this->columns[$name] : null;
}

            
getColumnNames() public method

Returns the names of all columns in this table.

public array getColumnNames ( )
return array

List of column names

                public function getColumnNames()
{
    return array_keys($this->columns);
}

            
isIsRuntime() public method (available since version 2.0.9)
Deprecated This method is deprecated, use $isRt instead.

public boolean isIsRuntime ( )
return boolean

Whether this index is a real-time index.

                public function isIsRuntime()
{
    return $this->isRt;
}

            
setIsRuntime() public method (available since version 2.0.9)
Deprecated This method is deprecated, use $isRt instead.

public void setIsRuntime ( $isRuntime )
$isRuntime boolean

Whether this index is a real-time index.

                public function setIsRuntime($isRuntime)
{
    $this->isRt = $isRuntime;
}