當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Container::delete方法代碼示例

本文整理匯總了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"');
開發者ID:jijkoun,項目名稱:ssscrape,代碼行數:31,代碼來源:container.test.php

示例2: unqueueCron

 public function unqueueCron(Container $cron)
 {
     $cron->delete();
     return $this;
 }
開發者ID:noikiy,項目名稱:inovi,代碼行數:5,代碼來源:Cron.php

示例3: delete

 /**
  * @inheritDoc
  */
 public function delete($key)
 {
     $this->items->delete($key);
 }
開發者ID:projx-io,項目名稱:container,代碼行數:7,代碼來源:ContainerMap.php

示例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');
 }
開發者ID:AsteriaGamer,項目名稱:steamdriven-kohana,代碼行數:11,代碼來源:containers_admin.php


注:本文中的Container::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。