public function register($name = null, $code = null)
    {
        $attributes = $this->attributes;


        if ($name) {
            $attributes['name'] = $name;
        }

        if ($code) {
            $attributes['code'] = $code;
        }

        $response = $this->_connection->post(
            Urls::URL_AQL_USER_FUNCTION,
            $this->getConnection()->json_encode_wrapper($attributes)
        );

        return $response->getJson();
    }
public function register($name = null, $code = null)
    {
        $attributes = $this->attributes;


        if ($name) {
            $attributes['name'] = $name;
        }

        if ($code) {
            $attributes['code'] = $code;
        }

        $response = $this->_connection->post(
            Urls::URL_AQL_USER_FUNCTION,
            $this->getConnection()->json_encode_wrapper($attributes)
        );

        return $response->getJson();
    }
public function register ( $ name = null , $ code = null ) { $ attributes = $ this -> attributes ; if ( $ name ) { $ attributes [ 'name' ] = $ name ; } if ( $ code ) { $ attributes [ 'code' ] = $ code ; } $ response = $ this -> _connection -> post ( Urls :: URL_AQL_USER_FUNCTION , $ this -> getConnection ( ) -> json_encode_wrapper ( $ attributes ) ) ; return $ response -> getJson ( ) ; }
Registers the user function

If no parameters ($name,$code) are passed, it will use the properties of the object.

If $name and/or $code are passed, it will override the object's properties with the passed ones

@param null $name
@param null $code

@throws Exception throws exception if registration failed

@return mixed true if registration was successful.
Registers the user function