本文整理汇总了PHP中SecurityToken::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP SecurityToken::getValue方法的具体用法?PHP SecurityToken::getValue怎么用?PHP SecurityToken::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SecurityToken
的用法示例。
在下文中一共展示了SecurityToken::getValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: emitPackagePurchaseOrder
/**
* @param $request
* @return SS_HTTPResponse|string
*/
public function emitPackagePurchaseOrder($request)
{
if (!Director::is_ajax()) {
return $this->forbiddenError();
}
if (!$this->packagePurchaseOrderSecurityToken->checkRequest($request)) {
return $this->forbiddenError();
}
$body = $this->request->getBody();
$json = json_decode($body, true);
$this->packagePurchaseOrderSecurityToken->reset();
try {
$this->getPackagePurchaseOrderManager()->registerPurchaseOrder($json, new NewPurchaseOrderEmailMessageSender());
} catch (EntityValidationException $ex1) {
SS_Log::log($ex1, SS_Log::WARN);
return $this->validationError($ex1->getMessages());
} catch (Exception $ex) {
SS_Log::log($ex, SS_Log::ERR);
return $this->serverError();
}
return $this->ok(array('token' => $this->packagePurchaseOrderSecurityToken->getValue()));
}
示例2: testNamedTokensCarryDifferentValues
function testNamedTokensCarryDifferentValues() {
$t1 = new SecurityToken('one');
$t2 = new SecurityToken('two');
$this->assertNotEquals($t1->getName(), $t2->getName());
$this->assertNotEquals($t1->getValue(), $t2->getValue());
}