Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * 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);
 }
Example #3
0
 /**
  * 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);
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     $this->bone_path = ROOT . '/vendor/enknot/bonetool/include';
 }
Example #5
0
 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;
 }
Example #6
0
 function __construct()
 {
     parent::__construct();
 }
Example #7
0
 /**
  * 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;
 }