/** * 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; }
/** * 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; }