Class: Contact_Vcard_Build
Source Location: /Contact_Vcard_Build-1.1.1/Contact_Vcard_Build.php
PEAR
|
--Contact_Vcard_Build
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 69]
Class Variables
Method Detail
Contact_Vcard_Build (Constructor) [line 128]
void Contact_Vcard_Build(
[string
$version = '3.0'])
|
|
Constructor.
Parameters:
addAddress [line 1653]
void addAddress(
mixed
$pob, mixed
$extend, mixed
$street, mixed
$locality, mixed
$region, mixed
$postcode, mixed
$country)
|
|
Sets the value of one entire ADR iteration. There can be zero, one, or more ADR components in a vCard.
Parameters:
addCategories [line 1899]
void addCategories(
mixed
$text, [
$append = true])
|
|
Sets the full value of the CATEGORIES component. There is only one component iteration allowed per vCard, but there may be multiple value repetitions in the iteration.
Parameters:
addEmail [line 1808]
void addEmail(
string
$text)
|
|
Sets the value of one EMAIL component iteration. There can be zero, one, or more component iterations in a vCard.
Parameters:
addLabel [line 1715]
void addLabel(
string
$text)
|
|
Sets the value of one LABEL component iteration. There can be zero, one, or more component iterations in a vCard.
Parameters:
addNickname [line 1857]
void addNickname(
mixed
$text)
|
|
Sets the full value of the NICKNAME component. There is only one component iteration allowed per vCard, but there may be multiple value repetitions in the iteration.
Parameters:
addOrganization [line 1947]
void addOrganization(
mixed
$text)
|
|
Sets the full value of the ORG component. There can be only one ORG component in a vCard. The ORG component can have one or more parts (as opposed to repetitions of values within those parts). The first part is the highest-level organization, the second part is the next-highest, the third part is the third-highest, and so on. There can by any number of parts in one ORG iteration. (This is different from other components, such as NICKNAME, where an iteration has only one part but may have many repetitions within that part.)
Parameters:
addParam [line 228]
mixed addParam(
string
$param_name, string
$param_value, [string
$comp = null], [mixed
$iter = null])
|
|
Adds a parameter value for a given component and parameter name. Note that although vCard 2.1 allows you to specify a parameter value without a name (e.g., "HOME" instead of "TYPE=HOME") this class is not so lenient. ;-) You must specify a parameter name (TYPE, ENCODING, etc) when adding a parameter. Call multiple times if you want to add multiple values to the same parameter. E.g.: $vcard = new Contact_Vcard_Build(); // set "TYPE=HOME,PREF" for the first TEL component $vcard->addParam('TEL', 0, 'TYPE', 'HOME'); $vcard->addParam('TEL', 0, 'TYPE', 'PREF');
Parameters:
addTelephone [line 1762]
void addTelephone(
string
$text)
|
|
Sets the value of one TEL component iteration. There can be zero, one, or more component iterations in a vCard.
Parameters:
addValue [line 602]
void addValue(
string
$comp, int
$iter, int
$part, mixed
$text)
|
|
Generic, all-purpose method to add a repetition of a string or array in $this->value, in a way suitable for later output as a vCard element. This appends the value to be the passed text or array value, leaving any prior values in place.
Parameters:
countIter [line 2359]
int countIter(
string
$type)
|
|
Count the number of iterations for an element type.
Parameters:
countRept [line 2385]
int countRept(
string
$type,
$rept, int
$iter)
|
|
Count the number of repetitions for an element type and iteration number.
Parameters:
escape [line 155]
mixed escape(
&$text, mixed
$text)
|
|
Prepares a string so it may be safely used as vCard values. DO NOT use this with binary encodings. Operates on text in-place; does not return a value. Recursively descends into arrays. Escapes a string so that... ; => \; , => \, newline => literal \n
Parameters:
fetch [line 2074]
Fetches a full vCard text block based on $this->value and $this->param. The order of the returned components is similar to their order in RFC 2426. Honors the value of $this->value['VERSION'] to determine which vCard components are returned (2.1- or 3.0-compliant).
getAddress [line 1682]
mixed getAddress(
int
$iter)
|
|
Gets back the value of one ADR component iteration.
Parameters:
getAgent [line 1564]
Gets back the value of the AGENT component. There is only one allowed per vCard.
getBirthday [line 1112]
Gets back the value of the BDAY component. There is only one allowed per vCard.
getCategories [line 1918]
Gets back the value of the CATEGORIES component. There is only one component allowed per vCard, but there may be multiple value repetitions in the iteration.
getClass [line 1374]
Gets back the value of the CLASS component. There is only one allowed per vCard.
getEmail [line 1831]
mixed getEmail(
int
$iter)
|
|
Gets back the value of one iteration of the EMAIL component. There can be zero, one, or more component iterations in a vCard.
Parameters:
getFormattedName [line 792]
string getFormattedName(
)
|
|
Gets back the full FN component value. Only ever returns iteration zero, because only one FN component is allowed per vCard.
getGeo [line 1607]
Gets back the value of the GEO component. There is only one allowed per vCard.
getKey [line 1074]
Gets back the value of the KEY component. There is only one allowed per vCard.
getLabel [line 1738]
mixed getLabel(
int
$iter)
|
|
Gets back the value of one iteration of the LABEL component. There can be zero, one, or more component iterations in a vCard.
Parameters:
getLogo [line 997]
Gets back the value of the LOGO component. There is only one allowed per vCard.
getMailer [line 1186]
Gets back the value of the MAILER component. There is only one allowed per vCard.
getMeta [line 529]
string getMeta(
string
$comp, [int
$iter = 0])
|
|
Gets the left-side/prefix/before-the-colon (metadata) part of a vCard line, including the component identifier, the parameter list, and a colon.
Parameters:
getName [line 709]
Gets back the full N component (first iteration only, since there can only be one N component per vCard).
getNickname [line 1876]
Gets back the value of the NICKNAME component. There is only one component allowed per vCard, but there may be multiple value repetitions in the iteration.
getNote [line 1223]
Gets back the value of the NOTE component. There is only one allowed per vCard.
getOrganization [line 1971]
string getOrganization(
)
|
|
Gets back the value of the ORG component.
getParam [line 438]
string getParam(
string
$comp, [int
$iter = 0])
|
|
Gets back the parameter string for a given component.
Parameters:
getPhoto [line 956]
Gets back the value of the PHOTO component. There is only one allowed per vCard.
getProductID [line 1450]
Gets back the value of the PRODID component. There is only one allowed per vCard.
getRevision [line 1490]
Gets back the value of the REV component. There is only one allowed per vCard.
getRole [line 1298]
Gets back the value of the ROLE component. There is only one allowed per vCard.
getSortString [line 1412]
Gets back the value of the SORT-STRING component. There is only one allowed per vCard.
getSound [line 1035]
Gets back the value of the SOUND component. There is only one allowed per vCard.
getSource [line 867]
Gets back the data-source of the the vCard. Only one iteration.
getSourceName [line 915]
Gets back the displayed data-source name of the the vCard. Only one iteration.
getTelephone [line 1785]
mixed getTelephone(
int
$iter)
|
|
Gets back the value of one iteration of the TEL component. There can be zero, one, or more component iterations in a vCard.
Parameters:
getTitle [line 1260]
Gets back the value of the TITLE component. There is only one allowed per vCard.
getTZ [line 1149]
Gets back the value of the TZ component. There is only one allowed per vCard.
getUniqueID [line 1527]
Gets back the value of the UID component. There is only one allowed per vCard.
getURL [line 1337]
Gets back the value of the URL component. There is only one allowed per vCard.
getValue [line 636]
string getValue(
string
$comp, [int
$iter = 0], [int
$part = 0], [mixed
$rept = null])
|
|
Generic, all-purpose method to get back the data stored in $this->value.
Parameters:
getVersion [line 831]
Gets back the version of the the vCard. Only one iteration.
reset [line 494]
void reset(
[string
$version = null])
|
|
Resets the vCard values and params to be blank.
Parameters:
send [line 2328]
void send(
string
$filename, [string
$disposition = 'attachment'], [string
$charset = 'us-ascii'])
|
|
Send the vCard as a downloadable file.
Parameters:
setAgent [line 1546]
void setAgent(
string
$text)
|
|
Sets the value of the AGENT component. There is only one allowed per vCard.
Parameters:
setBirthday [line 1094]
void setBirthday(
string
$text)
|
|
Sets the value of the BDAY component. There is only one allowed per vCard. Date format is "yyyy-mm-dd[Thh:ii[:ss[Z|-06:00]]]".
Parameters:
setClass [line 1356]
void setClass(
string
$text)
|
|
Sets the value of the CLASS component. There is only one allowed per vCard.
Parameters:
setFormattedName [line 736]
mixed setFormattedName(
[string
$text = null])
|
|
Sets the FN component of the card. If no text is passed as the FN value, constructs an FN automatically from N components. There is only one FN iteration per vCard.
Parameters:
setFromArray [line 2019]
void setFromArray(
array
$src)
|
|
Builds a vCard from a Contact_Vcard_Parse result array. Only send one vCard from the parse-results. Usage (to build from first vCard in parsed results): $parse = new Contact_Vcard_Parse(); // new parser $info = $parse->fromFile('sample.vcf'); // parse file $vcard = new Contact_Vcard_Build(); // new builder $vcard->setFromArray($info[0]); // [0] is the first card
Parameters:
setGeo [line 1588]
void setGeo(
string
$lat, string
$lon)
|
|
Sets the value of both parts of the GEO component. There is only one GEO component allowed per vCard.
Parameters:
setKey [line 1055]
void setKey(
string
$text)
|
|
Sets the value of the KEY component. There is only one allowed per vCard.
Parameters:
setLogo [line 978]
void setLogo(
string
$text)
|
|
Sets the value of the LOGO component. There is only one allowed per vCard.
Parameters:
setMailer [line 1168]
void setMailer(
string
$text)
|
|
Sets the value of the MAILER component. There is only one allowed per vCard.
Parameters:
setName [line 687]
void setName(
mixed
$family, mixed
$given, mixed
$addl, mixed
$prefix, mixed
$suffix)
|
|
Sets the full N component of the vCard. Will replace all other values. There can only be one N component per vCard.
Parameters:
setNote [line 1205]
void setNote(
string
$text)
|
|
Sets the value of the NOTE component. There is only one allowed per vCard.
Parameters:
setPhoto [line 937]
void setPhoto(
string
$text)
|
|
Sets the value of the PHOTO component. There is only one allowed per vCard.
Parameters:
setProductID [line 1432]
void setProductID(
string
$text)
|
|
Sets the value of the PRODID component. There is only one allowed per vCard.
Parameters:
setRevision [line 1472]
void setRevision(
string
$text)
|
|
Sets the value of the REV component. There is only one allowed per vCard.
Parameters:
setRole [line 1280]
void setRole(
string
$text)
|
|
Sets the value of the ROLE component. There is only one allowed per vCard.
Parameters:
setSortString [line 1394]
void setSortString(
string
$text)
|
|
Sets the value of the SORT-STRING component. There is only one allowed per vCard.
Parameters:
setSound [line 1017]
void setSound(
string
$text)
|
|
Sets the value of the SOUND component. There is only one allowed per vCard.
Parameters:
setSource [line 850]
void setSource(
string
$text)
|
|
Sets the data-source of the the vCard. Only one iteration.
Parameters:
setSourceName [line 888]
mixed setSourceName(
[string
$text = null])
|
|
Sets the displayed name of the vCard data-source. Only one iteration. If no name is specified, copies the value of SOURCE.
Parameters:
setTitle [line 1242]
void setTitle(
string
$text)
|
|
Sets the value of the TITLE component. There is only one allowed per vCard.
Parameters:
setTZ [line 1131]
void setTZ(
string
$text)
|
|
Sets the value of the TZ component. There is only one allowed per vCard.
Parameters:
setUniqueID [line 1509]
void setUniqueID(
string
$text)
|
|
Sets the value of the UID component. There is only one allowed per vCard.
Parameters:
setURL [line 1319]
void setURL(
string
$text)
|
|
Sets the value of the URL component. There is only one allowed per vCard.
Parameters:
setValue [line 569]
void setValue(
string
$comp, int
$iter, int
$part, mixed
$text)
|
|
Generic, all-purpose method to store a string or array in $this->value, in a way suitable for later output as a vCard element. This forces the value to be the passed text or array value, overriding any prior values.
Parameters:
setVersion [line 810]
mixed setVersion(
[string
$text = '3.0'])
|
|
Sets the version of the the vCard. Only one iteration.
Parameters:
validateParam [line 289]
mixed validateParam(
string
$name, string
$text, [string
$comp = null], [string
$iter = null])
|
|
Validates parameter names and values based on the vCard version (2.1 or 3.0).
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:19:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|