ao = $ao; $this->recvas = $recvas; $this->recvmtime = $mtime; $this->recvsize = $size; $this->ftype = self::IS_FILE; } public function __get($key) { switch ($key) { case 'exists': return Storage::disk(self::LOCATION)->exists($this->rel_name); case 'stor_name': return sprintf('%04X-%s',$this->ao->id,$this->recvas); case 'rel_name': return sprintf('%s/%s',config('app.fido'),$this->stor_name); case 'full_name': return Storage::disk(self::LOCATION)->path($this->rel_name); case 'match_mtime': return $this->mtime === $this->recvmtime; case 'match_size': return $this->size === $this->recvsize; case 'nameas': return $this->recvas; case 'recvmtime': return $this->recvmtime; case 'recvsize': return $this->recvsize; case 'name_size_time': return sprintf('%s %lu %lu',$this->recvas,$this->recvsize,$this->recvmtime); case 'mtime': return Storage::disk(self::LOCATION)->lastModified($this->rel_name); case 'size': return Storage::disk(self::LOCATION)->size($this->rel_name); default: return parent::__get($key); } } }