Phar Signature format
Phar::addEmptyDir
Phar
PHP Manual
La classe Phar
Introduction
La classe Phar fournit une interface de haut niveau pour accéder et créer des archives phar.
Synopsis de la classe
Phar
extends
RecursiveDirectoryIterator
implements
Countable
,
ArrayAccess
{
/* Propriétés */
/* Méthodes */
void
addEmptyDir
(
string
$dirname
)
void
addFile
(
string
$file
[,
string
$localname
] )
void
addFromString
(
string
$localname
,
string
$contents
)
string
apiVersion
(
void
)
array
buildFromDirectory
(
string
$base_dir
[,
string
$regex
] )
array
buildFromIterator
(
Iterator
$iter
[,
string
$base_directory
] )
bool
canCompress
([
int
$type
= 0
] )
bool
canWrite
(
void
)
object
compress
(
int
$compression
[,
string
$extension
] )
bool
compressAllFilesBZIP2
(
void
)
bool
compressAllFilesGZ
(
void
)
void
compressFiles
(
int
$compression
)
void
__construct
(
string
$fname
[,
int
$flags
[,
string
$alias
]] )
PharData
convertToData
([
int
$format
= 9021976
[,
int
$compression
= 9021976
[,
string
$extension
]]] )
Phar
convertToExecutable
([
int
$format
= 9021976
[,
int
$compression
= 9021976
[,
string
$extension
]]] )
bool
copy
(
string
$oldfile
,
string
$newfile
)
int
count
(
void
)
string
createDefaultStub
([
string
$indexfile
[,
string
$webindexfile
]] )
object
decompress
([
string
$extension
] )
bool
decompressFiles
(
void
)
bool
delMetadata
(
void
)
bool
delete
(
string
$entry
)
bool
extractTo
(
string
$pathto
[,
string|array
$files
[,
bool
$overwrite
= false
]] )
mixed
getMetaData
(
void
)
bool
getModified
(
void
)
array
getSignature
(
void
)
string
getStub
(
void
)
array
getSupportedCompression
(
void
)
array
getSupportedSignatures
(
void
)
string
getVersion
(
void
)
bool
hasMetadata
(
void
)
void
interceptFileFuncs
(
void
)
bool
isBuffering
(
void
)
mixed
isCompressed
(
void
)
bool
isFileFormat
(
int
$format
)
bool
isValidPharFilename
(
string
$filename
[,
bool
$executable
= true
] )
bool
isWritable
(
void
)
bool
loadPhar
(
string
$filename
[,
string
$alias
] )
bool
mapPhar
([
string
$alias
[,
int
$dataoffset
= 0
]] )
void
mount
(
string
$pharpath
,
string
$externalpath
)
void
mungServer
(
array
$munglist
)
bool
offsetExists
(
string
$offset
)
int
offsetGet
(
string
$offset
)
void
offsetSet
(
string
$offset
,
string
$value
)
bool
offsetUnset
(
string
$offset
)
string
running
([
bool
$retphar
= true
] )
bool
setAlias
(
string
$alias
)
bool
setDefaultStub
([
string
$index
[,
string
$webindex
]] )
void
setMetadata
(
mixed
$metadata
)
void
setSignatureAlgorithm
(
int
$sigtype
[,
string
$privatekey
] )
bool
setStub
(
string
$stub
)
void
startBuffering
(
void
)
void
stopBuffering
(
void
)
bool
uncompressAllFiles
(
void
)
bool
unlinkArchive
(
string
$archive
)
void
webPhar
([
string
$alias
[,
string
$index
= "index.php"
[,
string
$f404
[,
array
$mimetypes
[,
array
$rewrites
]]]]] )
}
Sommaire
Phar::addEmptyDir
— Ajoute un répertoire vide à l'archive phar
Phar::addFile
— Ajoute un fichier du système de fichiers à l'archive phar
Phar::addFromString
— Ajoute un fichier du système de fichiers à l'archive phar
Phar::apiVersion
— Retourne la version de l'API
Phar::buildFromDirectory
— Construit une archive phar à partir des fichiers d'un répertoire
Phar::buildFromIterator
— Construit une archive phar à partir d'un itérateur
Phar::canCompress
— Détermine si l'extension phar supporte une la compression en utilisant soit zip soit bzip2
Phar::canWrite
— Détermine si l'extension phar supporte la création et l'écriture des phars
Phar::compress
— Compresse l'archive Phar complète en utilisant la compression Gzip ou Bzip2
Phar::compressAllFilesBZIP2
— Compresse tous les fichiers de l'archive Phar courante en utilisant la compression Bzip2
Phar::compressAllFilesGZ
— Compresse tous les fichiers de l'archive Phar courante en utilisant la compression Gzip
Phar::compressFiles
— Compresse tous les fichiers de l'archive Phar courante'
Phar::__construct
— Construit un objet d'archive Phar
Phar::convertToData
— Convertit une archive phar en un fichier non-exécutable
Phar::convertToExecutable
— Convertit une archive phar vers un autre format de fichier d'archive phar exécutable
Phar::copy
— Copie un fichier appartenant à une archive vers un autre fichier de la même archive
Phar::count
— Retourne le nombre d'entrées (fichiers) dans l'archive Phar
Phar::createDefaultStub
— Crée un conteneur de chargement d'une archive Phar
Phar::decompress
— Décompresse l'archive tar complète
Phar::decompressFiles
— Décompresse tous les fichiers de l'archive Phar courante
Phar::delMetadata
— Efface les méta-données globales du phar
Phar::delete
— Efface un fichier au sein d'une archive phar
Phar::extractTo
— Extrait le contenu d'une archive phar vers un répertoire
Phar::getMetaData
— Retourne les méta-données de l'archive phar
Phar::getModified
— Indique si le fichier phar a été modifié
Phar::getSignature
— Retourne la signature MD5/SHA1/SHA256/SHA512 d'une archive Phar
Phar::getStub
— Retourne le chargeur PHP ou le conteneur de chargement d'une archive Phar
Phar::getSupportedCompression
— Retourne un tableau des algorithmes de compression supportés
Phar::getSupportedSignatures
— Retourne un tableau des types de signature supportés
Phar::getVersion
— Retourne les informations de version de l'archive Phar
Phar::hasMetaData
— Détermine si le phar a ou non des méta-données
Phar::interceptFileFuncs
— Informe phar qu'il doit intercepter les fonctions de fichiers
Phar::isBuffering
— Détermine si les opérations d'écriture du Phar sont mises en tampons ou sont directement inscrites sur le disque
Phar::isCompressed
— Retourne Phar::GZ ou PHAR::BZ2 si l'archive entière est compressée (.tar.gz/tar.bz, etc)
Phar::isFileFormat
— Retourne TRUE si l'archive phar est basée sur le formats de fichier tar/phar/zip selon le paramètre
Phar::isValidPharFilename
— Détermine si le nom de fichier spécifié est un nom de fichier valide pour une archive phar
Phar::isWritable
— Retourne TRUE si l'archive phar peut être modifiée
Phar::loadPhar
— Charge n'importe quelle archive phar avec un alias
Phar::mapPhar
— Lit le phar exécuté et charge son manifeste
Phar::mount
— Monte un chemin ou un fichier externe à un emplacement virtuel au sein de l'archive phar
Phar::mungServer
— Définit une liste de maximum 4 variables $_SERVER qui doivent être modifiées lors de l'exécution
Phar::offsetExists
— détermine si un fichier existe dans le phar
Phar::offsetGet
— Obtient un objet PharFileInfo à partir d'un fichier
Phar::offsetSet
— met le contenu d'un fichier interne à l'archive à l'identique du contenu d'un fichier externe
Phar::offsetUnset
— Efface un fichier d'un phar
Phar::running
— Retourne le chemin complet sur le disque ou l'URL phar complète de l'archive phar couramment exécutée
Phar::setAlias
— Fixe l'alias de l'archive Phar
Phar::setDefaultStub
— Utilisé pour fixer le chargeur PHP ou le conteneur de chargement d'une archive Phar en tant que chargeur par défaut
Phar::setMetadata
— Fixe les métadonnées de l'archive phar
Phar::setSignatureAlgorithm
— Fixe et applique l'algorithme de signature d'un phar
Phar::setStub
— Utilisé pour spécifier le chargeur PHP ou le conteneur de chargement d'une archive Phar
Phar::startBuffering
— Démarre la mise en tampon de écritures Phar, ne modifie pas l'objet Phar sur le disque
Phar::stopBuffering
— Arrête la mise en tampon des écritures Phar et provoque l'écriture que le disque
Phar::uncompressAllFiles
— Décompresse tous les fichiers de l'archive Phar courante
Phar::unlinkArchive
— Efface complètement une archive phar du disque et de la mémoire
Phar::webPhar
— mapPhar pour les phars orientés web. Contrôleur pour les applications web
Phar Signature format
Phar::addEmptyDir
Phar
PHP Manual