original_string: public function set($settings) {
  
          if (!$this->simple) {
              if (is_a($this->source, 'ToolConsumer')) {
                  $type = 'ToolProxy';
              } else if (is_a($this->source, 'ToolConsumer')) {
                  $type = 'ToolProxyBinding';
              } else {
                  $type = 'LtiLink';
              }
              $obj = new \stdClass();
              $obj->{'@context'} = 'http://purl.imsglobal.org/ctx/lti/v2/ToolSettings';
              $obj->{'@graph'} = array();
              $level = new \stdClass();
              $level->{'@type'} = $type;
              $level->{'@id'} = $this->endpoint;
              $level->{'custom'} = $settings;
              $obj->{'@graph'}[] = $level;
              $body = json_encode($obj);
          } else {
              $body = json_encode($settings);
          }
  
          $response = parent::send('PUT', null, $body);
  
          return $response->ok;
  
      }
code: public function set($settings) {
  
          if (!$this->simple) {
              if (is_a($this->source, 'ToolConsumer')) {
                  $type = 'ToolProxy';
              } else if (is_a($this->source, 'ToolConsumer')) {
                  $type = 'ToolProxyBinding';
              } else {
                  $type = 'LtiLink';
              }
              $obj = new \stdClass();
              $obj->{'@context'} = 'http://purl.imsglobal.org/ctx/lti/v2/ToolSettings';
              $obj->{'@graph'} = array();
              $level = new \stdClass();
              $level->{'@type'} = $type;
              $level->{'@id'} = $this->endpoint;
              $level->{'custom'} = $settings;
              $obj->{'@graph'}[] = $level;
              $body = json_encode($obj);
          } else {
              $body = json_encode($settings);
          }
  
          $response = parent::send('PUT', null, $body);
  
          return $response->ok;
  
      }
code_tokens: public function set ( $ settings ) { if ( ! $ this -> simple ) { if ( is_a ( $ this -> source , 'ToolConsumer' ) ) { $ type = 'ToolProxy' ; } else if ( is_a ( $ this -> source , 'ToolConsumer' ) ) { $ type = 'ToolProxyBinding' ; } else { $ type = 'LtiLink' ; } $ obj = new \ stdClass ( ) ; $ obj -> { '@context' } = 'http://purl.imsglobal.org/ctx/lti/v2/ToolSettings' ; $ obj -> { '@graph' } = array ( ) ; $ level = new \ stdClass ( ) ; $ level -> { '@type' } = $ type ; $ level -> { '@id' } = $ this -> endpoint ; $ level -> { 'custom' } = $ settings ; $ obj -> { '@graph' } [ ] = $ level ; $ body = json_encode ( $ obj ) ; } else { $ body = json_encode ( $ settings ) ; } $ response = parent :: send ( 'PUT' , null , $ body ) ; return $ response -> ok ; }
docstring: Set the tool settings.
  
  @param array  $settings  An associative array of settings (optional, default is null)
  
  @return HTTPMessage HTTP object containing request and response details
docstring_tokens: Set the tool settings .