Class: Contact_Vcard_Build
Source Location: /Contact_Vcard_Build-1.1.2/Contact/Vcard/Build.php
PEAR
|
--Contact_Vcard_Build
This class builds a single vCard (version 3.0 or 2.1).
Author(s):
Version:
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
Contact_Vcard_Build (Constructor) [line 110]
void Contact_Vcard_Build(
[string
$version = '3.0'])
|
|
Constructor.
Parameters:
addAddress [line 1355]
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 1563]
void addCategories(
mixed
$text)
|
|
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 1493]
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 1403]
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 1533]
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 1601]
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 211]
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('TYPE', 'HOME', 'TEL', 0); $vcard->addParam('TYPE', 'PREF', 'TEL', 0);
Parameters:
addTelephone [line 1443]
mixed addTelephone(
string
$text, [string
$type = 'phone'])
|
|
Sets the value of one component iteration. There can be zero, one, or more component iterations in a vCard. This function also takes a type argument to be able to add mobiles, fax and voice as well.
Parameters:
addValue [line 564]
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 2036]
int countIter(
string
$type)
|
|
Count the number of iterations for an element type.
Parameters:
countRept [line 2055]
int countRept(
string
$type, int
$rept)
|
|
Count the number of repetitions for an element type and iteration number.
Parameters:
escape [line 133]
mixed escape(
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 1712]
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 1379]
mixed getAddress(
int
$iter)
|
|
Gets back the value of one ADR component iteration.
Parameters:
getAgent [line 1288]
Gets back the value of the AGENT component. There is only one allowed per vCard.
getBirthday [line 963]
Gets back the value of the BDAY component. There is only one allowed per vCard.
getCategories [line 1577]
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 1152]
Gets back the value of the CLASS component. There is only one allowed per vCard.
getEmail [line 1513]
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 723]
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 1319]
Gets back the value of the GEO component. There is only one allowed per vCard.
getKey [line 936]
Gets back the value of the KEY component. There is only one allowed per vCard.
getLabel [line 1421]
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 882]
Gets back the value of the LOGO component. There is only one allowed per vCard.
getMailer [line 1017]
Gets back the value of the MAILER component. There is only one allowed per vCard.
getMeta [line 2012]
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 651]
Gets back the full N component (first iteration only, since there can only be one N component per vCard).
getNickname [line 1547]
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 1044]
Gets back the value of the NOTE component. There is only one allowed per vCard.
getOrganization [line 1622]
string getOrganization(
)
|
|
Gets back the value of the ORG component.
getParam [line 454]
string getParam(
string
$comp, [int
$iter = 0])
|
|
Gets back the parameter string for a given component.
Parameters:
getPhoto [line 848]
Gets back the value of the PHOTO component. There is only one allowed per vCard.
getProductID [line 1206]
Gets back the value of the PRODID component. There is only one allowed per vCard.
getRevision [line 1234]
Gets back the value of the REV component. There is only one allowed per vCard.
getRole [line 1098]
Gets back the value of the ROLE component. There is only one allowed per vCard.
getSortString [line 1179]
Gets back the value of the SORT-STRING component. There is only one allowed per vCard.
getSound [line 909]
Gets back the value of the SOUND component. There is only one allowed per vCard.
getSource [line 777]
Gets back the data-source of the the vCard. Only one iteration.
getSourceName [line 815]
Gets back the displayed data-source name of the the vCard. Only one iteration.
getTelephone [line 1469]
mixed getTelephone(
int
$iter, [string
$type = 'phone'])
|
|
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 1071]
Gets back the value of the TITLE component. There is only one allowed per vCard.
getTZ [line 990]
Gets back the value of the TZ component. There is only one allowed per vCard.
getUniqueID [line 1261]
Gets back the value of the UID component. There is only one allowed per vCard.
getURL [line 1125]
Gets back the value of the URL component. There is only one allowed per vCard.
getValue [line 593]
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 752]
Gets back the version of the the vCard. Only one iteration.
reset [line 507]
void reset(
[string
$version = null])
|
|
Resets the vCard values and params to be blank.
Parameters:
send [line 1981]
void send(
string
$filename, [string
$disposition = 'attachment'], [string
$charset = 'us-ascii'])
|
|
Send the vCard as a downloadable file.
Parameters:
setAgent [line 1275]
void setAgent(
string
$text)
|
|
Sets the value of the AGENT component. There is only one allowed per vCard.
Parameters:
setBirthday [line 950]
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 1139]
void setClass(
string
$text)
|
|
Sets the value of the CLASS component. There is only one allowed per vCard.
Parameters:
setFormattedName [line 672]
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 1662]
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 1305]
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 923]
void setKey(
string
$text)
|
|
Sets the value of the KEY component. There is only one allowed per vCard.
Parameters:
setLogo [line 869]
void setLogo(
string
$text)
|
|
Sets the value of the LOGO component. There is only one allowed per vCard.
Parameters:
setMailer [line 1004]
void setMailer(
string
$text)
|
|
Sets the value of the MAILER component. There is only one allowed per vCard.
Parameters:
setName [line 633]
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 1031]
void setNote(
string
$text)
|
|
Sets the value of the NOTE component. There is only one allowed per vCard.
Parameters:
setPhoto [line 830]
void setPhoto(
string
$text, [boolean
$url = false])
|
|
Sets the value of the PHOTO component. There is only one allowed per vCard.
Parameters:
setProductID [line 1193]
void setProductID(
string
$text)
|
|
Sets the value of the PRODID component. There is only one allowed per vCard.
Parameters:
setRevision [line 1221]
void setRevision(
string
$text)
|
|
Sets the value of the REV component. There is only one allowed per vCard. This value is free and should reflect whatever you use for control - e.g. a DATETIME value.
Parameters:
setRole [line 1085]
void setRole(
string
$text)
|
|
Sets the value of the ROLE component. There is only one allowed per vCard.
Parameters:
setSortString [line 1166]
void setSortString(
string
$text)
|
|
Sets the value of the SORT-STRING component. There is only one allowed per vCard.
Parameters:
setSound [line 896]
void setSound(
string
$text)
|
|
Sets the value of the SOUND component. There is only one allowed per vCard.
Parameters:
setSource [line 765]
void setSource(
string
$text)
|
|
Sets the data-source of the the vCard. Only one iteration.
Parameters:
setSourceName [line 792]
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 1058]
void setTitle(
string
$text)
|
|
Sets the value of the TITLE component. There is only one allowed per vCard.
Parameters:
setTZ [line 977]
void setTZ(
string
$text)
|
|
Sets the value of the TZ component. There is only one allowed per vCard.
Parameters:
setUniqueID [line 1248]
void setUniqueID(
string
$text)
|
|
Sets the value of the UID component. There is only one allowed per vCard.
Parameters:
setURL [line 1112]
void setURL(
string
$text)
|
|
Sets the value of the URL component. There is only one allowed per vCard.
Parameters:
setValue [line 539]
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 736]
mixed setVersion(
[string
$text = '3.0'])
|
|
Sets the version of the the vCard. Only one iteration.
Parameters:
validateParam [line 265]
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:
_setParam [line 2112]
void _setParam(
string
$comp, int
$iter, int
$part, mixed
$rept, mixed
$text)
|
|
_setParam
Parameters:
_setValue [line 2091]
void _setValue(
string
$comp, int
$iter, int
$part, mixed
$rept, mixed
$text)
|
|
_setValue
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:32:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|