Exemplo n.º 1
0
 /**
  * Should the given experiment be enabled in the current context?
  *
  * @param array $experimentData
  * @return boolean
  */
 static function isEnabled(array $experimentData)
 {
     if (empty($experimentData['criteria'])) {
         return false;
     }
     foreach ($experimentData['criteria'] as $criterion => $value) {
         if (!Criterion::factory($criterion)->matches($value)) {
             return false;
         }
     }
     return true;
 }