/** * ForeignKey * * @param string $name * @param Table $table * @param IndexColumn[] $columns * @param Table $refTable * @param IndexColumn[] $refColumns * @param string $match * @param string[] $actions */ public function __construct($name, Table $table, $columns, Table $refTable, $refColumns, $match, $actions) { parent::__construct($name, $columns, 'FOREIGN'); $this->table = $table; $this->refTable = $refTable; $this->refColumns = $refColumns; $this->match = $match; $this->actions = $actions; }
/** * Sets the index file, index offset and the index length * * @param string $path Index file * @param string $indexFieldOffset Index field offset * @param string $indexFieldLength Index field length * * @throws FileExistsIOException * @throws IOIndexException */ public function __construct($path, $indexFieldOffset, $indexFieldLength) { parent::__construct($path); $this->indexFieldOffset = $indexFieldOffset; $this->indexFieldLength = $indexFieldLength; $dummyLine = fgets($this->getFile()->getFilePointer()); if (!$dummyLine) { throw new IOIndexException("Could not read line length"); } $this->lineLength = strlen($dummyLine); }
/** * Creates a new primary key. * * @param string $table the name of the table * @param array $fields an array with fields used for the key */ public function __construct($table, $fields = array()) { parent::__construct('PRIMARY', $table, true, $fields); }
public function __construct() { parent::__construct(); $this->bone_path = ROOT . '/vendor/enknot/bonetool/include'; }
public function __construct() { parent::__construct(); // 回调函数 $this->api_callback = empty($_REQUEST['callback']) ? $this->api_callback : $_REQUEST['callback']; $this->api_callback = str_ireplace(array('cookie', 'alert'), '', $this->api_callback); preg_match('/[a-z0-9\\.]+/i', $this->api_callback, $matches); $this->api_callback = empty($matches[0]) ? null : $matches[0]; // data中的key $this->api_data_key = isset($_REQUEST['data_key']) ? true : false; }
function __construct() { parent::__construct(); }
/** * Sets the index file, container name and the index attribute * * @param string $path Index file * @param string $element Container name * @param string $attribute Index attribute name * * @throws FileExistsIOException * @throws IOIndexException */ public function __construct($path, $element, $attribute) { parent::__construct($path); $this->element = $element; $this->attribute = $attribute; }