本文整理匯總了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');
}