芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/cms.mgaplay.com.br/vendor/robmorgan/phinx/src/Phinx/Db/Table/Index.php
columns = $columns; return $this; } /** * Gets the index columns. * * @return array */ public function getColumns() { return $this->columns; } /** * Sets the index type. * * @param string $type * @return \Phinx\Db\Table\Index */ public function setType($type) { $this->type = $type; return $this; } /** * Gets the index type. * * @return string */ public function getType() { return $this->type; } /** * Sets the index name. * * @param string $name * @return \Phinx\Db\Table\Index */ public function setName($name) { $this->name = $name; return $this; } /** * Gets the index name. * * @return string */ public function getName() { return $this->name; } /** * Sets the index limit. * * @param int $limit * @return \Phinx\Db\Table\Index */ public function setLimit($limit) { $this->limit = $limit; return $this; } /** * Gets the index limit. * * @return int */ public function getLimit() { return $this->limit; } /** * Utility method that maps an array of index options to this objects methods. * * @param array $options Options * @throws \RuntimeException * @return \Phinx\Db\Table\Index */ public function setOptions($options) { // Valid Options $validOptions = ['type', 'unique', 'name', 'limit']; foreach ($options as $option => $value) { if (!in_array($option, $validOptions, true)) { throw new \RuntimeException(sprintf('"%s" is not a valid index option.', $option)); } // handle $options['unique'] if (strcasecmp($option, self::UNIQUE) === 0) { if ((bool)$value) { $this->setType(self::UNIQUE); } continue; } $method = 'set' . ucfirst($option); $this->$method($value); } return $this; } }