/** * Checks this type (Int16) is compatible with another type * Note: implementation of IType::isCompatibleWith * * @param IType $type Type to check compatibility * * @return boolean */ public function isCompatibleWith(IType $type) { switch ($type->getTypeCode()) { case TypeCode::BYTE: case TypeCode::SBYTE: case TypeCode::INT16: return true; } return false; }
/** * Checks this type (String) is compactible with another type * Note: implementation of IType::isCompatibleWith * * @param IType $type Type to check compactibility * * @return boolean */ public function isCompatibleWith(IType $type) { return $type->getTypeCode() == TypeCode::STRING; }
/** * Checks this type is compatible with another type * Note: implementation of IType::isCompatibleWith * * @param IType $type Type to check compatibility * * @return boolean */ public function isCompatibleWith(IType $type) { return $type->getTypeCode() == TypeCode::DATETIME; }
/** * Checks this type is compatible with another type * Note: implementation of IType::isCompatibleWith * * @param IType $type Type to check compatibility * * @return boolean */ public function isCompatibleWith(IType $type) { return $type->getTypeCode() == TypeCode::BOOLEAN; }