/** * Apply the commonly used REST path members to the class. * * @param string $resourcePath * * @return $this */ protected function setResourceMembers($resourcePath = null) { parent::setResourceMembers($resourcePath); $this->resource = ArrayUtils::get($this->resourceArray, 0); $pos = 1; $more = ArrayUtils::get($this->resourceArray, $pos); if (!empty($more)) { // This will be the full resource path do { $this->resource .= '/' . $more; $pos++; $more = ArrayUtils::get($this->resourceArray, $pos); } while (!empty($more)); } return $this; }
/** * Apply the commonly used REST path members to the class. * * @param string $resourcePath * * @return $this */ protected function setResourceMembers($resourcePath = null) { parent::setResourceMembers($resourcePath); $this->resource = ArrayUtils::get($this->resourceArray, 0); $pos = 1; $more = ArrayUtils::get($this->resourceArray, $pos); if (!empty($more)) { if (SnsEndpoint::RESOURCE_NAME !== $more) { do { $this->resource .= '/' . $more; $pos++; $more = ArrayUtils::get($this->resourceArray, $pos); } while (!empty($more) && SnsEndpoint::RESOURCE_NAME !== $more); } } return $this; }