Get filename for export.

@return string
555538
protected function filename(): string
    {
        $model = $this->model ?? trim(str_replace('DataTable', '', mb_strrchr(static::class, '\\')), " \t\n\r\0\x0B\\");

        $resource = str_plural(mb_strtolower(array_last(explode(class_exists($model) ? '\\' : '.', $model))));

        return $resource.'-export-'.date('Y-m-d').'-'.time();
    }
1291485
public function getName()
	{
		if (isset($this->basename))
		{
			return $this->basename;
		}

		if (isset($this->filename))
		{
			return $this->filename;
		}

		if (isset($this->path))
		{
			$bits = explode('/', $this->path);
			return end($bits);
		}

		return '';
	}
1199836
function getFilename(){
		if($content_disposition = $this->getHeaderValue("Content-Disposition")){
			if(preg_match('/filename="(.*?)"/',$content_disposition,$matches)){
				return $matches[1];
			}
		}
		if(preg_match("/([^\\/?]+)(\\?.*|)$/",$this->_Uri,$matches)){
			return $matches[1];
		}
	}
1310503
public function getFileName()
    {
        $filename = substr( strrchr( $this->elfinderFilePath, '/' ), 1 );
        $parts = explode('.',$filename);
        $last = array_pop($parts);
        $filename = str_slug(implode('_',$parts)) . '_' . time();
        return $filename  . '.' . $last;
    }
360466
public function getIndexedFilename()
    {
        $extension = strtolower($this->getMimeType());
        $extension = explode('/', $extension);
        $extension = $extension[1];

        return $this->uniqueName . $this->getImageIndex() . '.' . $extension;
    }
531237
public function getFilename()
    {
        if ($this->isDirty && $this->filename) {
            return $this->filename;
        }

        if ($this->riakGridFSFile instanceof \RiakGridFSFile && $filename = $this->riakGridFSFile->getFilename()) {
            return $filename;
        }

        return $this->filename;
    }
194174
public function getDisplayName()
	{
		if (isset($this->filename))
		{
			// If it is a dotfile the filename is '' and the extension will be the rest of the filename
			if ($this->filename == '' && isset($this->extension))
			{
				return '.' . $this->extension;
			}
			return $this->filename;
		}

		if (isset($this->basename))
		{
			return $this->basename;
		}

		if (isset($this->path))
		{
			$bits = explode('/', $this->path);
			return end($bits);
		}

		return '';
	}
1193548
public function getFileName($fileName, $ext='')
    {
        if (empty($ext)) {
            $fileName= substr($fileName, 0, strrpos($fileName, '.', -1));
        }
        else {
            if (substr($ext, 0, 1)!='.') {
                $ext= '.'.$ext;
            }

            if (substr($fileName, -(strlen($ext)))==$ext) {
                $fileName= substr($fileName, 0, -(strlen($ext)));
            }
        }

        $exFileName = explode('/', Utils\Util::toFormat($fileName, '/'));

        return end($exFileName);
    }
566168
public function filename()
    {
        $processor = Hash::get($this->settings, 'nameCallback', null);
        if (is_callable($processor)) {
            $numberOfParameters = (new \ReflectionFunction($processor))->getNumberOfParameters();
            if ($numberOfParameters == 2) {
                return $processor($this->data, $this->settings);
            }

            return $processor($this->table, $this->entity, $this->data, $this->field, $this->settings);
        }

        return $this->data['name'];
    }
1277455
protected function getNewFilename()
    {
        $filename = trim($this->option('resource-filename')) ?: Helpers::makeJsonFileName($this->getModelName());

        return str_finish($filename, '.json');
    }
238135
function getBasename()
    {
        $filename  = $this->getFilename();
        $extension = $this->getExtension();

        return ($extension === '' || $extension === null)
            ? $filename
            : $filename.'.'.$extension;
    }
797691
public static function get_filename( $name = '' ) {
		$name = str_replace( '.svg', '', $name );
		$filename = dirname( dirname( __DIR__ ) ) . "/svg/$name.svg";

		if ( file_exists( $filename ) ) {
			return $filename;
		}

		return '';
	}
589689
public function getFilename()
    {
        if (isset($this->viewVars['_filename'])) {
            return $this->viewVars['_filename'] . '.xlsx';
        }

        return Inflector::slug(str_replace('.xlsx', '', $this->request->url)) . '.xlsx';
    }
510733
public function generateFilename()
    {
        $filename = $this->label().' '.date('Y-m-d H-i-s');
        $extension = $this->generateExtension();

        if ($extension) {
            return $filename.'.'.$extension;
        } else {
            return $filename;
        }
    }
985569
private function getFilePath()
    {
        $fullname = $this->fullName;
        $rootPath = $_SERVER['DOCUMENT_ROOT'];

        if (substr($fullname, 0, 1) != '/') {
            $fullname = '/' . $fullname;
        }

        return $rootPath . $fullname;
    }
896333
public function getServerFilename(): string
    {
        $MEDIA_DIRECTORY = $this->media->tree()->getPreference('MEDIA_DIRECTORY');

        if ($this->multimedia_file_refn === '' || $this->isExternal()) {
            // External image, or (in the case of corrupt GEDCOM data) no image at all
            return $this->multimedia_file_refn;
        }

        // Main image
        return WT_DATA_DIR . $MEDIA_DIRECTORY . $this->multimedia_file_refn;
    }
479076
private function _extract_filename()
    {

        if (empty($this->file)) return false;

        $tmp_array = explode('/', $this->file);
        $count     = (int)count($tmp_array);
        for ($i = 0; $i < $count; $i++) {
            if ($i + 1 == $count) {
                $this->filename = (string)$tmp_array[0];
            }
            array_shift($tmp_array);
        }
        unset($tmp_array);

        return true;
    }