Uploader::getName PHP Method

getName() private method

重命名文件
private getName ( ) : string
return string
    private function getName()
    {
        return $this->fileName = time() . rand(1, 10000) . $this->getFileExt();
    }

Usage Example

Example #1
0
 public static function factory($accountType)
 {
     if (Instructor::getName() === $accountType) {
         return new Instructor();
     }
     if (Uploader::getName() === $accountType) {
         return new Uploader();
     }
     return new Student();
 }
All Usage Examples Of Uploader::getName