Exemple #1
0
 /**
  * Convert :primary_key, :name_kay and :unique_key to their corresponding column names
  * @param  string   $attribute
  * @param  Jam_Meta $meta
  * @param  mixed   $value
  * @return string
  */
 public static function resolve_meta_attribute($attribute, Jam_Meta $meta, $value = NULL)
 {
     switch ($attribute) {
         case ':primary_key':
             $attribute = $meta->primary_key();
             break;
         case ':name_key':
             $attribute = $meta->name_key();
             break;
         case ':unique_key':
             $attribute = $meta->unique_key($value);
             break;
     }
     return $attribute;
 }