Index.php in Drupal driver for SQL Server and SQL Azure 8.2
File
src/Indexes/Index.php
View source
<?php
namespace Drupal\sqlsrv\Indexes;
use Drupal\Driver\Database\sqlsrv\Utils;
class Index {
private $table;
private $name;
private $code;
public function __construct($uri) {
$name = pathinfo($uri, PATHINFO_FILENAME);
$parts = explode('@', basename($name));
if (count($parts) != 2) {
throw new \Exception('Incorrect SQL index file name format.');
}
$this->table = $parts[0];
$this->name = $parts[1];
$this->code = file_get_contents($uri);
}
public function GetTable() {
return $this->table;
}
public function GetName() {
return $this->name;
}
public function GetCode() {
return Utils::removeUtf8Bom($this->code);
}
}
Classes
Name |
Description |
Index |
Represents a database Index. |