内存表增加一列
@param string $name 字段的名称
@param int $type 字段类型，支持3种类型，MemoryTable::TYPE_COLUMN_INT, MemoryTable::TYPE_COLUMN_STRING, MemoryTable::TYPE_COLUMN_FLOAT
TYPE_COLUMN_FLOAT::TYPE_STRING，字符串类型，必须要指定最大长度
@param $size
@return bool|void
555829
public function addColumn($name, $type, $size = false) {
        return $this->table ? $this->table->column($name, $type, $size) : false;
    }
704808
public static function input($name, $type = INPUT_SERVER)
    {
        //====================================================================//
        // Standard Safe Reading
        $result = filter_input($type, $name);
        if (null !== $result) {
            return $result;
        }
        //====================================================================//
        // Fallback Reading
        if ((INPUT_SERVER === $type) && isset($_SERVER[$name])) {
            return $_SERVER[$name];
        }
        if ((INPUT_GET === $type) && isset($_GET[$name])) {
            return $_GET[$name];
        }

        return null;
    }
857839
public function setColumnType($name, $type)
    {
        $this->_columns[$name]['type'] = $type;
        $this->_typeMap[$name] = $type;

        return $this;
    }
844585
public static function size(string $name, int $size = 12)
    {
        $instance = new static();

        $instance->group['name'] = $name;
        $instance->group['size'] = $size;

        return $instance;
    }
723141
public function argument($type, $name) {
        $argument = new Argument($type, $name);
        $this->addArgument($argument);

        return $argument;
    }
492284
protected function getImageDimensions($type, $size)
	{
		$pathToImage = public_path($this->getImageConfig($type, $size, 'dir') . $this->$type);
		if (is_file($pathToImage) && file_exists($pathToImage))
		{
			list($width, $height) = getimagesize($pathToImage);
		}
		else
		{
			$width = $height = false;
		}
		return array($width, $height);
	}
634231
public function revoke(string $type, string $name,
                           int $mode = WebAclRule::READ) {
        $this->checkParam($type, $mode);

        $toDel         = array();
        $hasSomeRights = false;
        foreach ($this->resRules as $i) {
            if ($i->hasRole($type, $name) && $i->getMode() >= $mode) {
                $hasSomeRights = true;
                if ($i->getRolesCount() == 1) {
                    $toDel[] = $i;
                } else {
                    $i->deleteRole($type, $name);
                    if (self::$autosave) {
                        $i->save($this->res->getAclUrl());
                    }
                }
            }
        }
        $this->resRules = array_diff($this->resRules, $toDel);
        $this->extRules = array_diff($this->extRules, $toDel);
        foreach ($toDel as $i) {
            $i->delete(true);
        }

        if ($mode === WebAclRule::WRITE && $hasSomeRights) {
            $this->grant($type, $name, WebAclRule::READ, 0);
        }
    }
1065711
public function setDiscriminatorColumn($name, $type = 'string', $length = 255)
    {
        $this->cm->setDiscriminatorColumn(array(
            'name' => $name,
            'type' => $type,
            'length' => $length,
        ));

        return $this;
    }
1213473
public function createTextColumn(string $name, int $size, string $charset = null): TextColumn {
		throw new UnavailableTypeException('Sqlite does not support Text columns');
	}
1268685
private function addServices($name, $address, $port, $type)
    {
        switch ($type) {
            case "tcp":
                $config_name = 'consul_' . $name;
                if (!$this->config->has("tcpClient.$config_name")) {
                    $config_name = 'consul';
                }
                $this->tcp_services[$name][$address] = new ConsulRpc($this->config, $config_name, "$address:$port");
                if (get_instance()->server->worker_id == 0) {
                    secho("CONSUL", "发现$name($address:$port) TCP服务，应用配置$config_name");
                }
                break;
            case "http":
                $this->http_services[$name][$address] = new ConsulRest($this->config, "http://$address:$port");
                if (get_instance()->server->worker_id == 0) {
                    secho("CONSUL", "发现$name($address:$port) HTTP服务");
                }
                break;
        }
    }
719154
public function hasRole(string $type, string $name): bool {
        self::checkRoleType($type);
        return isset($this->roles[$type][$name]);
    }
187789
public function addText($col, $size = false)
  {
    $opts = array('null' => true);
    if ($size) {
      $opts['limit'] = $size === true ? static::LONGTEXT : $size;
    }

    return $this->add($col, static::COL_TEXT, $opts);
  }
1135153
public function type($name)
    {
        if (!$this->has($name)) {
            return;
        }
        $column = $this->column($name);
        return isset($column['type']) ? $column['type'] : null;
    }
326396
public function addColumn(
        $name,
        $type = 'text',
        $signed = true,
        $allowNull = true,
        $default = '',
        $comment = '',
        $options = []
    ) {
        $column = $name;

        if (!($column instanceof Column)) {
            $column = new Column($name, $type, $signed, $allowNull, $default, $comment, $options);
        }

        if ($this->hasColumn($column->getName())) {
            return $this;
        }

        $this->prepareColumn($column);

        $query = PostgresqlGrammar::addColumn(
            $this->getName(),
            $column->getName(),
            $column->getType() . $column->getLength(),
            $column->getAllowNull(),
            $column->getDefault()
        );

        $this->db->setQuery($query)->execute();

        if ($column->getComment()) {
            $query = PostgresqlGrammar::comment('COLUMN', $this->getName(), $column->getName(), $column->getComment());
            $this->db->setQuery($query)->execute();
        }

        return $this->reset();
    }
757124
public function hasExplicitBinding(string $type, $name = null): bool
    {
        if (PropertyBinding::TYPE === $type) {
            return $this->hasProperty($name);
        }

        $bindingName = $this->bindingName($name);
        if (null !== $bindingName && isset($this->index[$type . '#' . $bindingName])) {
            return true;
        }

        if (isset($this->index[$type])) {
            return true;
        }

        return false;
    }
650557
public function column($name, $type, $label=false, $width=false, $height=false) {
		if ($label === false) $label = $name;
		$this->columns[] = compact('name', 'type', 'label', 'width', 'height');
	}
469470
public function bindParam($name, &$var, $type = PDO::PARAM_STR, $length = null)
    {
        return $this->stmt->bindParam($name, $var, $type, $length);
    }