FileNamingResolver\FileInfo::toString PHP Méthode

toString() public méthode

Converts object to a string representation.
public toString ( ) : string
Résultat string
    public function toString()
    {
        return (string) $this;
    }

Usage Example

 /**
  * {@inheritdoc}
  *
  * @throws \InvalidArgumentException If source file does not exist
  */
 public function provideName(FileInfo $srcFileInfo)
 {
     if (!$srcFileInfo->isFile()) {
         throw new \InvalidArgumentException(sprintf('The source file does not exist on "%s" specified path.', $srcFileInfo->toString()));
     }
     $hash = hash_file($this->algorithm, $srcFileInfo->toString());
     $dstFileInfo = $this->provideNameByHash($srcFileInfo, $hash);
     return $dstFileInfo;
 }
All Usage Examples Of FileNamingResolver\FileInfo::toString