original_string: public function Save() {
      if (!$this->Validate()) {
        throw new \Exception("Validation failed");
      }
  
      $file = self::File($this->id);
      if (!is_dir(dirname($file))) {
        mkdir(dirname($file), 0755, true);
      }
  
      file_put_contents($file, serialize($this), LOCK_EX);
      return $this;
    }
code: public function Save() {
      if (!$this->Validate()) {
        throw new \Exception("Validation failed");
      }
  
      $file = self::File($this->id);
      if (!is_dir(dirname($file))) {
        mkdir(dirname($file), 0755, true);
      }
  
      file_put_contents($file, serialize($this), LOCK_EX);
      return $this;
    }
code_tokens: public function Save ( ) { if ( ! $ this -> Validate ( ) ) { throw new \ Exception ( "Validation failed" ) ; } $ file = self :: File ( $ this -> id ) ; if ( ! is_dir ( dirname ( $ file ) ) ) { mkdir ( dirname ( $ file ) , 0755 , true ) ; } file_put_contents ( $ file , serialize ( $ this ) , LOCK_EX ) ; return $ this ; }
docstring: Save this object.
  @return boolean true on success
docstring_tokens: Save this object .