本文整理汇总了PHP中Container::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::delete方法的具体用法?PHP Container::delete怎么用?PHP Container::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Container
assert('$data["bar"] === "bar_value"');
assert('$data["bar"] !== "wrong"');
assert('$data["baz"] === "baz_value_default"');
assert('$data["baz"] !== "baz_value"');
$data = $test->to_array(false);
assert('count($data) === 2');
assert('$data["bar"] === "bar_value"');
assert('$data["bar"] !== "wrong"');
assert('$data["foo"] !== "foo_value"');
assert('$data["foo"] === "bla"');
/* Test delete() */
$testdelete = new Container();
assert('!$testdelete->is_set("bla")');
$testdelete->set('bla', 'woeiwoei');
assert('$testdelete->is_set("bla")');
$testdelete->delete('bla');
assert('!$testdelete->is_set("bla")');
/* Test underscores and dashes juggling */
$c = new Container();
$c->set('foo_bar', 'baz');
assert('$c->get("foo-bar") === "baz"');
assert('$c->get("foo_bar") === "baz"');
$c->set('foo-bar', 'baz2');
assert('$c->get("foo-bar") === "baz2"');
assert('$c->get("foo_bar") === "baz2"');
$c->add('some-list', 'value');
$c->add('some_list', 'value');
assert('count($c->get("some-list")) === 2');
/* Test getdefault() and setdefault() */
$c = new Container();
assert('$c->getdefault("foo", "defaultvalue") === "defaultvalue"');
示例2: unqueueCron
public function unqueueCron(Container $cron)
{
$cron->delete();
return $this;
}
示例3: delete
/**
* @inheritDoc
*/
public function delete($key)
{
$this->items->delete($key);
}
示例4: delete
/**
* Not defensively programmed. Shouldn't work on GET and should ask user to confirm they
* want to delete. Hey Ho, time's pressing.
*
*/
function delete()
{
$c = new Container($this->uri->segment(3, $_POST['container']));
$c->delete();
url::redirect('containers_admin');
}