PHP Class TextAnalysis\Downloaders\DownloadPackageFactory

Author: yooper
Afficher le fichier Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Свойство Type Description
$package TextAnalysis\Utilities\Nltk\Download\Package

Méthodes publiques

Méthode Description
download ( Package $package ) : DownloadPackageFactory Initializes and downloads the remote corpus
getDownloadFullPath ( ) : string Has the full path to where the download should go
getInstallDir ( ) : string The path where the software should be installed
getPackage ( ) : Package
initialize ( ) Initialize the directories required for the download
verifyChecksum ( ) : boolean Verify the packages checksum against the downloaded file

Méthodes protégées

Méthode Description
__construct ( Package $package ) Installs the package
downloadRemoteFile ( )
extractZip ( $srcPath, $extractToDir ) Use PHP's ZipArchive to extract out the data
isZip ( string $path ) : boolean
recursiveCopy ( string $src, string $dst ) Recursive copy the directory
unpackPackage ( ) de-compress the downloaded corpus into the install directory, or copy the files into the install directory

Method Details

__construct() protected méthode

Installs the package
protected __construct ( Package $package )
$package TextAnalysis\Utilities\Nltk\Download\Package

download() public static méthode

Initializes and downloads the remote corpus
public static download ( Package $package ) : DownloadPackageFactory
$package TextAnalysis\Utilities\Nltk\Download\Package
Résultat DownloadPackageFactory

downloadRemoteFile() protected méthode

protected downloadRemoteFile ( )

extractZip() protected méthode

Use PHP's ZipArchive to extract out the data
protected extractZip ( $srcPath, $extractToDir )

getDownloadFullPath() public méthode

Has the full path to where the download should go
public getDownloadFullPath ( ) : string
Résultat string

getInstallDir() public méthode

The path where the software should be installed
public getInstallDir ( ) : string
Résultat string

getPackage() public méthode

public getPackage ( ) : Package
Résultat TextAnalysis\Utilities\Nltk\Download\Package

initialize() public méthode

Initialize the directories required for the download
public initialize ( )

isZip() protected méthode

protected isZip ( string $path ) : boolean
$path string
Résultat boolean

recursiveCopy() protected méthode

Recursive copy the directory
protected recursiveCopy ( string $src, string $dst )
$src string
$dst string

unpackPackage() protected méthode

de-compress the downloaded corpus into the install directory, or copy the files into the install directory
protected unpackPackage ( )

verifyChecksum() public méthode

Verify the packages checksum against the downloaded file
public verifyChecksum ( ) : boolean
Résultat boolean

Property Details

$package protected_oe property

protected Package,TextAnalysis\Utilities\Nltk\Download $package
Résultat TextAnalysis\Utilities\Nltk\Download\Package