public function edit()
    {
        if ($this->isRequestGet()) {
            try {
                $this->returnSuccess($this->getForm($this->getResourceParameter())->getData());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        if ($this->isRequestPost()) {
            try {
                $this->processForm($this->getResourceParameter());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        $this->returnFailure(new common_exception_MethodNotAllowed(__METHOD__ . ' only accepts GET or PUT method'));
    }
public function edit()
    {
        if ($this->isRequestGet()) {
            try {
                $this->returnSuccess($this->getForm($this->getResourceParameter())->getData());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        if ($this->isRequestPost()) {
            try {
                $this->processForm($this->getResourceParameter());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        $this->returnFailure(new common_exception_MethodNotAllowed(__METHOD__ . ' only accepts GET or PUT method'));
    }
public function edit ( ) { if ( $ this -> isRequestGet ( ) ) { try { $ this -> returnSuccess ( $ this -> getForm ( $ this -> getResourceParameter ( ) ) -> getData ( ) ) ; } catch ( common_Exception $ e ) { $ this -> returnFailure ( $ e ) ; } } if ( $ this -> isRequestPost ( ) ) { try { $ this -> processForm ( $ this -> getResourceParameter ( ) ) ; } catch ( common_Exception $ e ) { $ this -> returnFailure ( $ e ) ; } } $ this -> returnFailure ( new common_exception_MethodNotAllowed ( __METHOD__ . ' only accepts GET or PUT method' ) ) ; }
Edit a resource found into http request parameters

If http method is GET, return the form data
If http method is PUT, process form

The PUT request has to follow this structure:
array (
'propertyUri' => 'value',
'propertyUri1' => 'value1',
'propertyUri2' => 'value2',
'propertyUri3' => array(
'value', 'value2',
)
)

@requiresRight uri WRITE
Edit a resource found into http request parameters