/**
  * Sets cache types
  *
  * @param  string $type
  * @return self
  */
 public function setTypes($type)
 {
     $arrTypes = explode(',', $type);
     $types = [];
     foreach ($arrTypes as $type) {
         $type = trim($type);
         if (CacheType::has($type) && !in_array($type, $types)) {
             $types[] = $type;
         }
     }
     return $this->setProperty('type', implode(',', $types));
 }
Beispiel #2
0
 public function testCacheType()
 {
     $values = array('skin', 'locale', 'account', 'cos', 'domain', 'server', 'zimlet');
     foreach ($values as $value) {
         $this->assertTrue(\Zimbra\Enum\CacheType::has($value));
     }
 }