示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * 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;
 }
示例#3
0
 /**
  * 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;
 }
示例#4
0
 /**
  * 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;
 }