code: public function fromData($data)
      {
          $this->fromdata = $data;
          $resource = fopen('php://memory', 'r+');
          fwrite($resource, $data);
          rewind($resource);
          
          //        $resource = fopen('data://text/plain,' . $data, 'r+');
          $this->setResource($resource);
          
          return $this;
      }
docs: Lecture depuis une chaine
  
  @param $string
  
  @return $this