Example #1
0
 public static function untag($bean, $tagList)
 {
     if ($tagList !== false && !is_array($tagList)) {
         $tags = explode(",", (string) $tagList);
     } else {
         $tags = $tagList;
     }
     foreach ($tags as $tag) {
         $t = RedBean_Facade::findOne('tag', " title = ? ", array($tag));
         if ($t) {
             RedBean_Facade::unassociate($bean, $t);
         }
     }
 }