/**
  * Sets types
  *
  * @param  string $types
  * @return self
  */
 public function setTypes($types)
 {
     $arrType = [];
     $types = explode(',', trim($types));
     foreach ($types as $type) {
         $type = trim($type);
         if (ReindexType::has($type) && !in_array($type, $arrType)) {
             $arrType[] = trim($type);
         }
     }
     return $this->setProperty('types', implode(',', $arrType));
 }
Example #2
0
 public function testReindexType()
 {
     $values = array('conversation', 'message', 'contact', 'appointment', 'task', 'note', 'wiki', 'document');
     foreach ($values as $value) {
         $this->assertTrue(\Zimbra\Enum\ReindexType::has($value));
     }
 }