PHP 클래스 TextAnalysis\Downloaders\DownloadPackageFactory

저자: yooper
파일 보기 프로젝트 열기: yooper/php-text-analysis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$package TextAnalysis\Utilities\Nltk\Download\Package

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
__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

메소드 상세

__construct() 보호된 메소드

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

download() 공개 정적인 메소드

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

downloadRemoteFile() 보호된 메소드

protected downloadRemoteFile ( )

extractZip() 보호된 메소드

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

getDownloadFullPath() 공개 메소드

Has the full path to where the download should go
public getDownloadFullPath ( ) : string
리턴 string

getInstallDir() 공개 메소드

The path where the software should be installed
public getInstallDir ( ) : string
리턴 string

getPackage() 공개 메소드

public getPackage ( ) : Package
리턴 TextAnalysis\Utilities\Nltk\Download\Package

initialize() 공개 메소드

Initialize the directories required for the download
public initialize ( )

isZip() 보호된 메소드

protected isZip ( string $path ) : boolean
$path string
리턴 boolean

recursiveCopy() 보호된 메소드

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

unpackPackage() 보호된 메소드

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

verifyChecksum() 공개 메소드

Verify the packages checksum against the downloaded file
public verifyChecksum ( ) : boolean
리턴 boolean

프로퍼티 상세

$package 보호되어 있는 프로퍼티

protected Package,TextAnalysis\Utilities\Nltk\Download $package
리턴 TextAnalysis\Utilities\Nltk\Download\Package