Beispiel #1
0
 /**
  * Get http method and uri from resource method name.
  *
  * @param string $resourceMethodName
  * @return array
  */
 protected function getHttpMethodAndUri($resourceMethodName)
 {
     if (!preg_match('/^([a-z]+)((?:[A-Z][a-z0-9]*?)+)$/', $resourceMethodName, $match)) {
         return ['httpMethod' => $resourceMethodName, 'uri' => $this->_baseUri];
     } else {
         return ['httpMethod' => $match[1], 'uri' => $this->_baseUri . Str::convertSnake($match[2], '-')];
     }
 }