Remove rule.

@param  string $ruleName
768316
protected function removeRule($ruleName)
    {
        $rule = $this->authManager->getRule($ruleName);
        if (empty($rule)) {
            throw new InvalidParamException("Rule '{$ruleName}' does not exists");
        }
        echo "    > removing rule $rule->name ...";
        $time = microtime(true);
        $this->authManager->remove($rule);
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }
1017082
public static function removeRuleByName($name)
    {
        $auth = Yii::$app->authManager;
        $rule = $auth->getRule($name);
        return $auth->remove($rule);
    }
1350457
def _RemoveForemanRule(self):
    """"""
    if data_store.RelationalDBEnabled():
      data_store.REL_DB.RemoveForemanRule(hunt_id=self.session_id.Basename())
      return

    with aff4.FACTORY.Open(
        "aff4:/foreman", mode="rw", token=self.token) as foreman:
      aff4_rules = foreman.Get(foreman.Schema.RULES)
      aff4_rules = foreman.Schema.RULES(
          # Remove those rules which fire off this hunt id.
          [r for r in aff4_rules if r.hunt_id != self.session_id])
      foreman.Set(aff4_rules)
1000176
def remove_rule_entry(self, rule_info):
        """"""

        temp_list = list(self.rule_info)
        for rule in temp_list:
            if (rule.ip == rule_info.get('ip') and
                rule.mac == rule_info.get('mac') and
                    rule.port == rule_info.get('port')):
                LOG.debug('Removed rule info %s from the list', rule_info)
                self.rule_info.remove(rule)
486799
protected function deletePriceRule()
    {
        $this->controlAccess('price_rule_delete');

        if ($this->price_rule->delete($this->data_rule['price_rule_id'])) {
            $this->redirect('admin/sale/price', $this->text('Price rule has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Price rule has not been deleted'), 'warning');
    }
468747
public function deactivate($featureName)
    {
        $feature = $this->getFeature($featureName);
        $feature->clearConfig();
        $this->saveFeature($feature);
    }
1360820
public function getRule($ruleName)
    {
        return isset($this->rules[$ruleName]) ? $this->rules[$ruleName] : null;
    }
1315979
public function addRule(Rule $rule)
    {
        $this->addReason($rule->getId(), array(
            'rule' => $rule,
            'job' => $rule->getJob(),
        ));
    }
464362
public function removeRules($keys, $ruleset = null)
    {
        $keys = is_array($keys) ? $keys : func_get_args();
        $rules = $ruleset ? $this->getRuleset($ruleset) : $this->getRules();
        array_forget($rules, $keys);
        if ($ruleset) {
            $this->setRuleset($rules, $ruleset);
        } else {
            $this->setRules($rules);
        }
    }
1255354
public function removeTag($tagName)
    {
        if ($this->tags !== null && array_key_exists($tagName, $this->tags)) {
            unset($this->tags[$tagName]);
        }
    }
360022
public function removeToolbarItem($name) {
        if(!isset($this->toolbarItems[$name])) {
            unset($this->toolbarItems[$this->getRouteName() . '.' . $name]);
        }

        unset($this->toolbarItems[$name]);
    }
958877
public function clearMessages($blockName) {
        $messages = $this->getMessages();
        unset($messages[$blockName]);
        $this->setMessages($messages);
    }
334013
public function removeListeners(string $eventName): void
    {
        foreach ($this->dispatcher->getListeners($eventName) as $listener) {
            $this->removeListener($eventName, $listener);
        }
    }
169298
public function handleDelete(string $fileName): void
	{
		if ($this->presenter->isAjax() && $this->editable) {
			$file = $this->getFileInfo($fileName);
			if ($file->isDir) {
				File::removeDir($this->getFullPath($file->name));
			} else {
				unlink($this->getFullPath($file->name));
			}
			$this->redrawControl('fileManagerContainer');
		} else {
			exit;
		}
	}
1005737
public function removeProperty( ADT_CSS_Rule $rule, ADT_CSS_Property $property ){
		return $this->remove( $rule->getSelector(), $property->getKey() );
	}
1117082
function detachCustomName(ruleName) {
    ruleName = removeSpace(ruleName);
    var nameRE = /[-\w]+\(/g;
    var name = '';

    if(ruleName.match(nameRE)) {
        name = ruleName.match(nameRE)[0];
        name = name.substring(0, name.length - 1);
    }

    return name;
}
518573
public function remove($name)
    {
        $this->requireNames();
        
        $lower = strtolower($name);
        if(array_key_exists($lower, $this->names)) {
            $name = $this->names[$lower];
            unset($this->names[$lower]);
            unset($this->headers[$name]);
        }
    }