RedBeanPHP\Repository\Fluid::getTypeFromCast PHP Метод

getTypeFromCast() приватный Метод

Given a cast ID, this method will return the associated type (INT(10) or VARCHAR for instance). The returned type can be processed by the Query Writer to build the specified column for you in the database. The Cast ID is actually just a superset of the QueryWriter types. In addition to default Query Writer column types you can pass the following 'cast types': 'id' and 'string'. These will map to Query Writer specific column types (probably INT and VARCHAR).
private getTypeFromCast ( string $cast ) : integer
$cast string cast identifier
Результат integer
    private function getTypeFromCast($cast)
    {
        if ($cast == 'string') {
            $typeno = $this->writer->scanType('STRING');
        } elseif ($cast == 'id') {
            $typeno = $this->writer->getTypeForID();
        } elseif (isset($this->writer->sqltype_typeno[$cast])) {
            $typeno = $this->writer->sqltype_typeno[$cast];
        } else {
            throw new RedException('Invalid Cast');
        }
        return $typeno;
    }