public function moveResource()
    {
        try {
            if (!$this->hasRequestParameter('uri')) {
                throw new InvalidArgumentException('Resource uri must be specified.');
            }

            $data = $this->getRequestParameter('uri');
            $id = $data['id'];

            $this->validateUri($id);
            $this->validateInstanceRoot($id);

            $this->signatureValidator->checkSignature($data['signature'], $id);

            $ids = [$id];

            $this->validateMoveRequest();
            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
public function moveResource()
    {
        try {
            if (!$this->hasRequestParameter('uri')) {
                throw new InvalidArgumentException('Resource uri must be specified.');
            }

            $data = $this->getRequestParameter('uri');
            $id = $data['id'];

            $this->validateUri($id);
            $this->validateInstanceRoot($id);

            $this->signatureValidator->checkSignature($data['signature'], $id);

            $ids = [$id];

            $this->validateMoveRequest();
            $response = $this->moveAllInstances($ids);
            $this->returnJson($response);
        } catch (\InvalidArgumentException $e) {
            $this->returnJsonError($e->getMessage());
        }
    }
public function moveResource ( ) { try { if ( ! $ this -> hasRequestParameter ( 'uri' ) ) { throw new InvalidArgumentException ( 'Resource uri must be specified.' ) ; } $ data = $ this -> getRequestParameter ( 'uri' ) ; $ id = $ data [ 'id' ] ; $ this -> validateUri ( $ id ) ; $ this -> validateInstanceRoot ( $ id ) ; $ this -> signatureValidator -> checkSignature ( $ data [ 'signature' ] , $ id ) ; $ ids = [ $ id ] ; $ this -> validateMoveRequest ( ) ; $ response = $ this -> moveAllInstances ( $ ids ) ; $ this -> returnJson ( $ response ) ; } catch ( \ InvalidArgumentException $ e ) { $ this -> returnJsonError ( $ e -> getMessage ( ) ) ; } }
Move a single resource to another class

@requiresRight uri WRITE

@throws common_exception_Error
@throws common_exception_MethodNotAllowed
Move a single resource to another class