本文整理汇总了PHP中PKPString::camelize方法的典型用法代码示例。如果您正苦于以下问题:PHP PKPString::camelize方法的具体用法?PHP PKPString::camelize怎么用?PHP PKPString::camelize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PKPString
的用法示例。
在下文中一共展示了PKPString::camelize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRequestedOp
/**
* Retrieve the requested operation from the request
*
* NB: This can be an operation that not actually
* exists in the requested component.
*
* @param $request PKPRequest
* @return string the requested operation or an empty string
* if none can be found.
*/
function getRequestedOp($request)
{
if (is_null($this->_op)) {
$this->_op = '';
// Retrieve the service endpoint parts from the request.
if (is_null($rpcServiceEndpointParts = $this->_getValidatedServiceEndpointParts($request))) {
// Endpoint parts cannot be found in the request
return '';
}
// Pop off the operation part
$this->_op = PKPString::camelize(array_pop($rpcServiceEndpointParts), CAMEL_CASE_HEAD_DOWN);
}
return $this->_op;
}
示例2: getId
/**
* Returns a canonical form of the property
* name ready to be used as a property id in an
* external context (e.g. Forms or Templates).
* @return string
*/
function getId()
{
// Replace special characters in XPath-like names
// as 'person-group[@person-group-type="author"]'.
$from = array('[', ']', '@', '"', '=');
$to = array('-', '', '', '', '-');
$propertyId = trim(str_replace($from, $to, $this->getName()), '-');
$propertyId = PKPString::camelize($propertyId);
return $propertyId;
}