Get the class shortname and format in a filename structure

@since 3.0.0

@return mixed
184761
protected static function getClassname()
    {
        $className = explode('\\', get_called_class());
        $className = array_pop($className);

        return str_replace('_', '-', strtolower($className));
    }
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;
    }
1035764
protected function getFileName()
    {
        if (null === $this->fileName) {
            $this->fileName = $this->lockDirectory.'/'.$this->applicationName.'.pid';
        }

        return $this->fileName;
    }
1324746
public function getName()
    {
        if (!$this->name) {
            if ($this->config['name']) {
                return $this->name = $this->config['name'];
            }

            $ref = new \ReflectionClass(static::class);

            $name = substr($ref->getShortName(), 0, -10);

            return $this->name = strtolower($name);
        }

        return $this->name;
    }
333441
public function getShortName()
    {
        $app = Strata::app();

        $classHash = md5(get_class($this));
        $cacheKey = "runtime.static.$classHash.shortname";

        if (!$app->hasConfig($cacheKey)) {
            $rc = new ReflectionClass($this);
            $app->setConfig($cacheKey, $rc->getShortName());
        }

        return $app->getConfig($cacheKey);
    }
175849
public function getFilename()
	{
		if (is_null($this->filename)) {
			$this->filename = pathinfo($this->path, PATHINFO_BASENAME);
		}
		return $this->filename;
	}
261270
public function getExtendedClassName()
    {
        if ($this->getExtendedClass() === null) {
            return '';
        }

        $name = str_replace('%', ' ', $this->getExtendedClass());
        $name = str_replace('.', ' ', $name);
        $name = str_replace(':', ' pseudo-class-', $name);
        return trim($name);
    }
724030
public String shortName() {
        String classname = getClass().getName();
        int last = classname.lastIndexOf(".");
        return classname.substring(last + 1);
    }
770121
public static function getSDKClassName($shortName)
        {
            if (0 === strpos($shortName, '\\')) {
                return $shortName;
            }

            // replace underscores with namespace marker, PSR-0 style
            $psr0name = str_replace('_', '\\', $shortName);
            if (false === strpos($psr0name, '\\')) {
                $psr0name .= '';
            }

            return '\\UniApi\\'.$psr0name.'\\'.$psr0name;
        }
807626
public function getIndexedFilename()
    {
        $fileName = $this->getFilename();
        $fileName = str_replace(' ', '_', $fileName);
        return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension();
    }
360466
public function getIndexedFilename()
    {
        $extension = strtolower($this->getMimeType());
        $extension = explode('/', $extension);
        $extension = $extension[1];

        return $this->uniqueName . $this->getImageIndex() . '.' . $extension;
    }
1310537
protected function helper_fullname_format() {
        $fake = new stdClass();
        $fake->lastname = 'LLLL';
        $fake->firstname = 'FFFF';
        $fullname = get_string('fullnamedisplay', '', $fake);
        if (strpos($fullname, 'LLLL') < strpos($fullname, 'FFFF')) {
            return 'lf';
        } else {
            return 'fl';
        }
    }
898466
public function getShortNames()
    {
        $names = [];

        $used = [];
        foreach (static::SHORT_NAME as $name => $value) {
            if ($this->has($value) && !in_array($value, $used)) {
                $names[] = $name;
                $used[] = $value;
            }
        }

        return $names;
    }
1068776
public function get_extension()
  {
    if ( $this->name ){
      if ( !isset($this->ext) ){
        if ( strpos($this->name, '.') !== false ){
          $p = str::file_ext($this->name, 1);
          $this->ext = $p[1];
          $this->title = $p[0];
        }
        else{
          $this->ext = '';
          $this->title = substr($this->name,-1) === '/' ? substr($this->name,0,-1) : $this->name;
        }
      }
      return $this->ext;
    }
    return false;
  }
176348
protected function getClass()
    {
        // Retrieve path to Resources and shortname's class
        $class = new \ReflectionClass(get_class($this));

        // Return a simple array
        return [
            'name'      => $class->getShortName(),
            'path'      => $class->getFileName(),
            'resources' => dirname(dirname($class->getFileName())).S.'Resources',
        ];
    }
400970
protected function getShortcodeData()
    {
        if($this->shortcodedata){
            return $this->shortcodedata;
        }
        $data = false;
        if($shortcode = $this->request->requestVar('Shortcode')){
            //remove BOM inside string on cursor position...
            $shortcode = str_replace("\xEF\xBB\xBF", '', $shortcode);
            $data = singleton('\Silverstripe\Shortcodable\ShortcodableParser')->the_shortcodes(array(), $shortcode);
            if(isset($data[0])){
                $this->shortcodedata = $data[0];
                return $this->shortcodedata;
            }
        }
    }
276843
public function getFileName() {
        $isTestClass = substr($this->getName(), -4) == 'Test';
        if($isTestClass) {
            $rootDirectory = $this->getConfiguration()->getRootTestDirectory();
        } else {
            $rootDirectory = $this->getConfiguration()->getRootDirectory();
        }
        if(substr($this->getNamespace(), 0, strlen($this->getConfiguration()->getRootNamespace())) != $this->getConfiguration()->getRootNamespace()) {
            throw new \Exception('The Root namespace does not match this classes namespace, could not get the file name'."\n".$this->getNamespace()."\n".$this->getConfiguration()->getRootNamespace());
        }
        if($isTestClass) {
            $namespace = $this->getNamespace();
        } else {
            $namespace = substr($this->getNamespace(), strlen($this->getConfiguration()->getRootNamespace()));
        }
        if(DIRECTORY_SEPARATOR != '\\') {
            $namespace = str_replace('\\', DIRECTORY_SEPARATOR, $namespace);
        }
        return $rootDirectory . DIRECTORY_SEPARATOR . $namespace . DIRECTORY_SEPARATOR . $this->getName() . '.php';
    }