LazyRecord\TableParser\SqliteTableDefinitionParser::tryParseTypeName PHP Method

tryParseTypeName() protected method

protected tryParseTypeName ( )
    protected function tryParseTypeName()
    {
        $blobTypes = ['BLOB', 'NONE'];
        $realTypes = ['REAL', 'DOUBLE', 'DOUBLE PRECISION', 'FLOAT'];
        $allTypes = array_merge(self::$intTypes, self::$textTypes, $blobTypes, $realTypes, self::$numericTypes);
        $this->sortKeywordsByLen($allTypes);
        foreach ($allTypes as $typeName) {
            // Matched
            if (($p2 = stripos($this->str, $typeName, $this->p)) !== false && $p2 == $this->p) {
                $this->p += strlen($typeName);
                return new Token('type-name', $typeName);
            }
        }
        return;
        // throw new Exception('Expecting type-name');
    }