本文整理汇总了PHP中Resource::post方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::post方法的具体用法?PHP Resource::post怎么用?PHP Resource::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::post方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post
/**
* @param \Base $f3
* @param array $params
*/
public function post(\Base $f3, $params)
{
$this->response->data['SUBPART'] = 'webot_edit.html';
$msg = \Flash::instance();
if (isset($params['id'])) {
// update existing
$this->resource->load(array('_id = ?', $params['id']));
}
parent::post($f3, $params);
}
示例2: request
/**
* Executes request on link.
*
* @param string $url
* @param string $method
* @param array $postfields
* @return null|string
*/
private function request($url, $method = 'GET', $postfields = [])
{
switch (strtolower($method)) {
case "get":
return $this->ch->get($url);
break;
case "post":
return $this->ch->post($url, $postfields);
break;
}
return null;
}
示例3: post
public function post(\Base $f3, $params)
{
$this->response->data['SUBPART'] = 'user_edit.html';
$msg = \Flash::instance();
if (isset($params['id'])) {
// update existing
$this->resource->load(array('_id = ?', $params['id']));
if ($f3->get('HOST') == 'ikkez.de' && !$this->resource->dry() && $this->resource->username == 'admin') {
$msg->addMessage("You are not allowed to change the demo-admin", 'danger');
$f3->reroute('/admin/' . $params['module']);
return;
}
}
parent::post($f3, $params);
}
示例4: post
/**
* update/create post
* @param \Base $f3
* @param array $params
*/
public function post(\Base $f3, $params)
{
parent::post($f3, $params);
if ($this->response instanceof \View\Backend) {
$this->initBackend();
}
}
示例5: post
public function post(\Engine\IResponse $response)
{
parent::post($response);
$response->sendData(["url" => $this->url->getUrl(), "method" => $this->method->getMethod(), "get" => $this->get, "post" => $this->post, "Provider\\Test" => $this->provider->get("Test")->checkIfWorking()]);
}