src/DB/PDO/TableReader.php
public function setIndices( $indices )
	{
		foreach( $indices as $index )
		{
			if( !in_array( $index, $this->columns ) )
				throw new \InvalidArgumentException( 'Column "'.$index.'" is not existing in table "'.$this->tableName.'" and cannot be an index' );
			if( $index === $this->primaryKey )
				throw new \InvalidArgumentException( 'Column "'.$index.'" is already primary key and cannot be an index' );
		}
		$this->indices	= $indices;
		array_unique( $this->indices );
	}
public function setIndices( $indices )
	{
		foreach( $indices as $index )
		{
			if( !in_array( $index, $this->columns ) )
				throw new \InvalidArgumentException( 'Column "'.$index.'" is not existing in table "'.$this->tableName.'" and cannot be an index' );
			if( $index === $this->primaryKey )
				throw new \InvalidArgumentException( 'Column "'.$index.'" is already primary key and cannot be an index' );
		}
		$this->indices	= $indices;
		array_unique( $this->indices );
	}
public function setIndices ( $ indices ) { foreach ( $ indices as $ index ) { if ( ! in_array ( $ index , $ this -> columns ) ) throw new \ InvalidArgumentException ( 'Column "' . $ index . '" is not existing in table "' . $ this -> tableName . '" and cannot be an index' ) ; if ( $ index === $ this -> primaryKey ) throw new \ InvalidArgumentException ( 'Column "' . $ index . '" is already primary key and cannot be an index' ) ; } $ this -> indices = $ indices ; array_unique ( $ this -> indices ) ; }
Setting all indices of this table.
@access		public
@param		array		$indices		List of table indices
@return		bool
Setting all indices of this table .