/** * Check if a behavior is enabled for a particular context/bucket combination. * * @param \Zumba\Swivel\BehaviorInterface $behavior * * @return bool * * @see \Zumba\Swivel\BucketInterface */ public function enabled(BehaviorInterface $behavior) { $slug = $behavior->getSlug(); if (!$this->featureMap->slugExists($slug)) { call_user_func($this->callback, $slug); } return $this->featureMap->enabled($slug, $this->index); }
/** * Check if a behavior is enabled for a particular context/bucket combination * * @param \Zumba\Swivel\BehaviorInterface $behavior * @return boolean * @see \Zumba\Swivel\BucketInterface */ public function enabled(BehaviorInterface $behavior) { return $this->featureMap->enabled($behavior->getSlug(), $this->index); }