/** Return FileModel path and filename * @param bool $base * @return string */ public function getFilePath($base = true) { $separator = $base ? DIRECTORY_SEPARATOR : '/'; $path = App::getAppc()['directories']['media'] . $separator . $this->getShortClassName() . $separator . floor((int) $this->fileid / 200) . $separator . $this->fileid . (isset($this->extension) ? '.' . $this->extension : ''); return $base ? App::basePath() . $path : $separator . $path; }
public function getImageUrl() { return DIRECTORY_SEPARATOR . App::getAppc()['directories']['media'] . DIRECTORY_SEPARATOR . $this->getShortClassName() . DIRECTORY_SEPARATOR . $this->userid . '.jpg'; }