本文整理匯總了PHP中Slim\Helper\Set::remove方法的典型用法代碼示例。如果您正苦於以下問題:PHP Set::remove方法的具體用法?PHP Set::remove怎麽用?PHP Set::remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Slim\Helper\Set
的用法示例。
在下文中一共展示了Set::remove方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __unset
public function __unset($name)
{
$this->container->remove($name);
}
示例2: function
$client->map([$app->config('database')['db_name'] => '\\API\\Collection']);
$client->useDatabase($app->config('database')['db_name']);
return $client;
});
});
// CORS compatibility layer (Internet Explorer)
$app->hook('slim.before.router', function () use($app) {
if ($app->request->isPost() && $app->request->get('method')) {
$method = $app->request->get('method');
$app->environment()['REQUEST_METHOD'] = strtoupper($method);
mb_parse_str($app->request->getBody(), $postData);
$parameters = new Set($postData);
if ($parameters->has('content')) {
$content = $parameters->get('content');
$app->environment()['slim.input'] = $content;
$parameters->remove('content');
} else {
// Content is the only valid body parameter...everything else are either headers or query parameters
$app->environment()['slim.input'] = '';
}
$app->request->headers->replace($parameters->all());
$app->environment()['slim.request.query_hash'] = $parameters->all();
}
});
// Parse version
$app->hook('slim.before.dispatch', function () use($app) {
// Version
$app->container->singleton('version', function () use($app) {
if ($app->request->isOptions() || $app->request->getPathInfo() === '/about' || strpos(strtolower($app->request->getPathInfo()), '/oauth') === 0) {
$versionString = $app->config('xAPI')['latest_version'];
} else {