Example #1
0
 public function save(SplFileObject $file)
 {
     \tool::fprint("Saving ... " . get_called_class() . (isset($this->name) ? ":{$this->name}" : '') . "@{$file->ftell()}");
     return $file->fwrite(isset($this->name) ? Dictionary::mapName($this->id) . TAG_String::store($this->name) : '');
 }
Example #2
0
 public static function createFrom(Reader $file)
 {
     \tool::fprint("Reading ... " . get_called_class() . "::" . __FUNCTION__);
     return new static(TAG_String::readFrom($file), static::readFrom($file));
 }
Example #3
0
 public static function createFrom(Reader $file)
 {
     $self = new static(TAG_String::readFrom($file));
     return static::readFrom($file, $self);
 }