src/Charcoal/Property/StructureProperty.php
public function setSqlType($sqlType)
    {
        if (!is_string($sqlType)) {
            throw new InvalidArgumentException(
                'SQL Type must be a string.'
            );
        }

        switch (strtoupper($sqlType)) {
            case 'TEXT':
                $sqlType = 'TEXT';
                break;

            case 'TINY':
            case 'TINYTEXT':
                $sqlType = 'TINYTEXT';
                break;

            case 'MEDIUM':
            case 'MEDIUMTEXT':
                $sqlType = 'MEDIUMTEXT';
                break;

            case 'LONG':
            case 'LONGTEXT':
                $sqlType = 'LONGTEXT';
                break;

            default:
                throw new InvalidArgumentException(
                    'SQL Type must be one of TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.'
                );
        }

        $this->sqlType = $sqlType;

        return $this;
    }
public function setSqlType($sqlType)
    {
        if (!is_string($sqlType)) {
            throw new InvalidArgumentException(
                'SQL Type must be a string.'
            );
        }

        switch (strtoupper($sqlType)) {
            case 'TEXT':
                $sqlType = 'TEXT';
                break;

            case 'TINY':
            case 'TINYTEXT':
                $sqlType = 'TINYTEXT';
                break;

            case 'MEDIUM':
            case 'MEDIUMTEXT':
                $sqlType = 'MEDIUMTEXT';
                break;

            case 'LONG':
            case 'LONGTEXT':
                $sqlType = 'LONGTEXT';
                break;

            default:
                throw new InvalidArgumentException(
                    'SQL Type must be one of TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.'
                );
        }

        $this->sqlType = $sqlType;

        return $this;
    }
public function setSqlType ( $ sqlType ) { if ( ! is_string ( $ sqlType ) ) { throw new InvalidArgumentException ( 'SQL Type must be a string.' ) ; } switch ( strtoupper ( $ sqlType ) ) { case 'TEXT' : $ sqlType = 'TEXT' ; break ; case 'TINY' : case 'TINYTEXT' : $ sqlType = 'TINYTEXT' ; break ; case 'MEDIUM' : case 'MEDIUMTEXT' : $ sqlType = 'MEDIUMTEXT' ; break ; case 'LONG' : case 'LONGTEXT' : $ sqlType = 'LONGTEXT' ; break ; default : throw new InvalidArgumentException ( 'SQL Type must be one of TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.' ) ; } $ this -> sqlType = $ sqlType ; return $ this ; }
Set the property's SQL encoding & collation.

@param string $sqlType The field SQL column type.
@throws InvalidArgumentException If the SQL type is invalid.
@return self
Set the property s SQL encoding & collation .