original_string: public function set($key, $value)
      {
          $keys = explode('.', $key);
  
          $data = $this->getAll();
  
          $resource = &$data;
          foreach ($keys as $key) {
              if (!isset($resource[$key]) || !is_array($resource[$key])) {
                  $resource[$key] = [];
              }
              $resource = &$resource[$key];
          }
          $resource = $value;
  
          $this->setAll($data);
  
          return $this;
      }
code: public function set($key, $value)
      {
          $keys = explode('.', $key);
  
          $data = $this->getAll();
  
          $resource = &$data;
          foreach ($keys as $key) {
              if (!isset($resource[$key]) || !is_array($resource[$key])) {
                  $resource[$key] = [];
              }
              $resource = &$resource[$key];
          }
          $resource = $value;
  
          $this->setAll($data);
  
          return $this;
      }
code_tokens: public function set ( $ key , $ value ) { $ keys = explode ( '.' , $ key ) ; $ data = $ this -> getAll ( ) ; $ resource = & $ data ; foreach ( $ keys as $ key ) { if ( ! isset ( $ resource [ $ key ] ) || ! is_array ( $ resource [ $ key ] ) ) { $ resource [ $ key ] = [ ] ; } $ resource = & $ resource [ $ key ] ; } $ resource = $ value ; $ this -> setAll ( $ data ) ; return $ this ; }
docstring: Set specific value by key if resource set. It's possible to set using . to separate keys by depth.
  
  $getSet->set("one.two.three", "value") is equal to $resource["one"]["two"]["three"] = $value;
  
  @param string $key
  @param mixed  $value
  
  @return $this
docstring_tokens: Set specific value by key if resource set . It s possible to set using . to separate keys by depth .