Example #1
0
 /**
  * Return an array of arguments that when passed to Query::validate() validate a value
  *
  * @param array $dataType. A element of Entity\Base::dataTypes array. Generated by Bond\Normality\Entity::getTypesArray()
  * @param array $additionalModifiers
  *
  * @return array Array of arguments suitable for use by call_user_func_array
  */
 public function toQueryValidateArgs(array $modifiers = array())
 {
     throw new \Bond\Exception\Depreciated("Use getQueryModifier()");
     if (isset($modifiers['cast'])) {
         // datatypes which aren't all lower case need to be identifier quoted
         if (strtolower($this->data['type']) !== $this->data['type']) {
             $type = Query::quoteIdentifier($this->data['type']);
         } else {
             $type = $this->data['type'];
         }
         $modifiers['cast'] = $type;
     }
     if ($this->data['isNullable']) {
         $modifiers[] = 'null';
     }
     return array($this->data['type'], false, $modifiers);
 }