LeanMapper\Reflection\PropertyType::__construct PHP Method

__construct() public method

public __construct ( string $type, Aliases $aliases )
$type string
$aliases Aliases
    public function __construct($type, Aliases $aliases)
    {
        if (preg_match('#^(boolean|bool|integer|int|float|string|array)$#', $type)) {
            if ($type === 'bool') {
                $type = 'boolean';
            }
            if ($type === 'int') {
                $type = 'integer';
            }
            $this->isBasicType = true;
        } else {
            if (substr($type, 0, 1) === '\\') {
                $type = substr($type, 1);
            } else {
                $type = $aliases->translate($type);
            }
            $this->isBasicType = false;
        }
        $this->type = $type;
    }