PHP Class FileNamingResolver\NamingStrategy\AbstractHashNamingStrategy

Author: Victor Bocharsky ([email protected])
Inheritance: extends AbstractNamingStrategy
Afficher le fichier Open project: bocharsky-bw/FileNamingResolver

Protected Properties

Свойство Type Description
$algorithm Hash algorithm
$partCount Count of parts
$partLength Length of each part

Méthodes publiques

Méthode Description
__construct ( string $algorithm = self::ALGORITHM_MD5, integer $partCount = 2, integer $partLength = 2 )
getAlgorithm ( ) : string
getPartCount ( ) : integer
getPartLength ( ) : integer
provideNameByHash ( FileInfo $srcFileInfo, string $hash ) : FileInfo

Method Details

__construct() public méthode

public __construct ( string $algorithm = self::ALGORITHM_MD5, integer $partCount = 2, integer $partLength = 2 )
$algorithm string
$partCount integer
$partLength integer

getAlgorithm() public méthode

public getAlgorithm ( ) : string
Résultat string

getPartCount() public méthode

public getPartCount ( ) : integer
Résultat integer

getPartLength() public méthode

public getPartLength ( ) : integer
Résultat integer

provideNameByHash() public méthode

public provideNameByHash ( FileInfo $srcFileInfo, string $hash ) : FileInfo
$srcFileInfo FileNamingResolver\FileInfo
$hash string
Résultat FileNamingResolver\FileInfo

Property Details

$algorithm protected_oe property

Hash algorithm
protected $algorithm

$partCount protected_oe property

Count of parts
protected $partCount

$partLength protected_oe property

Length of each part
protected $partLength