constructeur de PEAR_ChannelFile::
PEAR_ChannelFile
(Previous)
(Next) PEAR_ChannelFile::addMirror

View this page in Last updated: Sun, 28 Sep 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Plain HTML

PEAR_ChannelFile::addFunction()

PEAR_ChannelFile::addFunction()  -- Ajoute un protocole à la section fournie

Description

Ajoute un support pour les fonctions xml-rpc or SOAP à un fichier de définition de canal. Le type doit être xmlrpc ou soap en minuscule. Aucune validation n'est effectué à l'insertion. Par exemple :


<?php
require_once 'PEAR/ChannelFile.php';
$chan = new PEAR_ChannelFile;
$chan->setName('foo.example.com');
$chan->setSummary('demonstrate addFunction');
$chan->addFunction('xmlrpc''1.0''people.list');
$chan->addFunction('oops''1.0''bad.type');
?>

Le protocole oops sera créé avec succès mais échouera à la validation.

Ajout d'une fonction à un miroir en effectuant une validation simple afin de s'assurer que le miroir existe déjà.


<?php
require_once 'PEAR/ChannelFile.php';
$chan = new PEAR_ChannelFile;
$chan->setName('foo.example.com');
$chan->setSummary('demonstrate addFunction');
// fails: mirror not found
$chan->addFunction('soap''1.0''people.list''mirror.example.com');
$chan->addMirror('mirror.example.com');
// succeeds
$chan->addFunction('soap''1.0''people.list''mirror.example.com');
?>

Paramètres

chaîne de caractères $type

Type du protocole

chaîne de caractères $version

Version du protocole

chaîne de caractères $name

Nom du protocole, s'il en a un

chaîne de caractères $mirror

Nom du miroir, si c'est un protocole de miroir

Valeurs renvoyées

Aucune exception n'est lancée.

Note

Cette fonction ne peut pas être appelée de façon statique.

constructeur de PEAR_ChannelFile::
PEAR_ChannelFile
(Previous)
(Next) PEAR_ChannelFile::addMirror

Download Documentation Last updated: Sun, 28 Sep 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.