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


PHP Worker::__construct方法代碼示例

本文整理匯總了PHP中Worker::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Worker::__construct方法的具體用法?PHP Worker::__construct怎麽用?PHP Worker::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Worker的用法示例。


在下文中一共展示了Worker::__construct方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 function __construct($config)
 {
     parent::__construct($config);
     $this->register_handler("do_get_testsyncphp_thing_v1");
     $this->register_handler("do_put_testsyncphp_thing_v1");
     $this->register_handler("do_post_testsyncphp_thing_v1");
     $this->register_handler("do_delete_testsyncphp_thing_v1");
 }
開發者ID:wqx081,項目名稱:gearbox,代碼行數:8,代碼來源:workerTestSync.php

示例2:

 function __construct($config)
 {
     parent::__construct($config);
     $this->register_handler("do_post_testcancelphp_thing_v1");
     $this->register_handler("do_cancel_testcancelphp_thing_v1");
     $this->register_handler("do_post_testcancelphp_continuation_v1");
     $this->register_handler("do_run_testcancelphp_continuation_v1");
     $this->register_handler("do_finish_testcancelphp_continuation_v1");
 }
開發者ID:wqx081,項目名稱:gearbox,代碼行數:9,代碼來源:workerTestCancel.php

示例3: foreach

 function __construct($config)
 {
     parent::__construct($config);
     $this->register_handler("do_get_testagentsphp_thing_v1", "thing_handler");
     $this->register_handler("do_post_testagentsphp_thing_v1", "thing_handler");
     $this->register_handler("do_delete_testagentsphp_thing_v1", "thing_handler");
     foreach (array("A", "B", "C", "D") as $resource) {
         foreach (array("reg", "unreg") as $op) {
             $this->register_handler("do_{$op}_testagentsphp_{$resource}_v1", "dummy_handler");
         }
     }
 }
開發者ID:wqx081,項目名稱:gearbox,代碼行數:12,代碼來源:workerTestAgents.php

示例4:

 function __construct($config)
 {
     parent::__construct($config);
     $this->register_handler("do_get_testchainedphp_hello_v1");
     $this->register_handler("do_get_internalphp_hello1_v1");
     $this->register_handler("do_post_testchainedphp_hello2_v1");
     $this->register_handler("do_get_testchainedphp_goodbye_v1");
     $this->register_handler("do_post_testchainedphp_goodbye_v1");
     $this->register_handler("do_append_internalphp_goodbye1_v1");
     $this->register_handler("do_append_internalphp_goodbye2_v1");
     $this->register_handler("do_get_testchainedphp_thing_v1");
     $this->register_handler("do_post_testchainedphp_thing_v1");
     $this->register_handler("do_reg_internalphp_service1_v1");
     $this->register_handler("do_post_testchainedphp_service2_v1");
     $this->register_handler("do_delete_testchainedphp_thing_v1");
     $this->register_handler("do_unreg_internalphp_service1_v1");
     $this->register_handler("do_delete_testchainedphp_service2_v1");
 }
開發者ID:wqx081,項目名稱:gearbox,代碼行數:18,代碼來源:workerTestChained.php

示例5:

		function __construct($name, $fname, $age, $salary, $passwd, $categorySales){
			
			parent::__construct($name, $fname, $age, $salary, $passwd);
			
			$this->categorySales = $categorySales;
		}
開發者ID:BETEP2063,項目名稱:PHP-lections,代碼行數:6,代碼來源:oop+extends.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
 }
開發者ID:cxj009,項目名稱:php-light-queue,代碼行數:4,代碼來源:test.php

示例7: __construct

 public function __construct($host, $port, $opts = array())
 {
     parent::__construct("hdp://{$host}:{$port}", $opts);
     $this->name = "hprose";
     $this->_hprose = new \Bridge\HproseWorkermanService($this);
 }
開發者ID:suhanyujie,項目名稱:hprose-workerman,代碼行數:6,代碼來源:HproseWorkermanService.php

示例8: array

 function __construct($core, $tasks = array(), $autosubmit = true)
 {
     $this->tasks = $tasks;
     $this->autosubmit = $autosubmit;
     parent::__construct($core);
 }
開發者ID:tomzx,項目名稱:wikimedia-apibot,代碼行數:6,代碼來源:_generic.php

示例9:

 function __construct($config)
 {
     parent::__construct($config);
     $this->register_handler("do_get_testphp_example_v1");
     $this->register_handler("do_post_testphp_example_v1");
 }
開發者ID:wqx081,項目名稱:gearbox,代碼行數:6,代碼來源:workerTestPhp.php


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