public function checkType($value)
    {
        if (isset($this->name) && null !== $this->name) {
            $fn = 'is_'.$this->name;

            return $fn($value);
        }

        throw new \Exception('Invalid name or name not defined for primitive type.');
    }
public function checkType($value)
    {
        if (isset($this->name) && null !== $this->name) {
            $fn = 'is_'.$this->name;

            return $fn($value);
        }

        throw new \Exception('Invalid name or name not defined for primitive type.');
    }
public function checkType ( $ value ) { if ( isset ( $ this -> name ) && null !== $ this -> name ) { $ fn = 'is_' . $ this -> name ; return $ fn ( $ value ) ; } throw new \ Exception ( 'Invalid name or name not defined for primitive type.' ) ; }
Is the value type the same of this object?

@param mixed $value The value to check

@return bool
Is the value type the same of this object?