public function getFileName($field) { if (!isset($this->_fileName[$field])) { if (is_null($this->fields[$field]['translitField'])) { $this->_fileName[$field] = md5(microtime()) . '.' . pathinfo($this->_fileInstance[$field], PATHINFO_EXTENSION); } else { $this->_fileName[$field] = CommonHelper::translit($this->owner->{$this->fields[$field]['translitField']}) . '.' . pathinfo($this->_fileInstance[$field], PATHINFO_EXTENSION); } } return $this->_fileName[$field]; }