PHP 클래스 JeroenDesloovere\VCard\VCard

저자: Jeroen Desloovere ([email protected])
파일 보기 프로젝트 열기: jeroendesloovere/vcard 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$charset string Default Charset

공개 메소드들

메소드 설명
addAddress ( $name = '', $extended = '', $street = '', $city = '', $region = '', $zip = '', $country = '', $type = 'WORK;POSTAL' ) Add address
addBirthday ( string $date ) Add birthday
addCompany ( string $company ) Add company
addEmail ( string $address, $type = '' ) Add email
addJobtitle ( string $jobtitle ) Add jobtitle
addLogo ( string $url, boolean $include = true ) Add Logo
addName ( $lastName = '', $firstName = '', $additional = '', $prefix = '', $suffix = '' ) Add name
addNote ( string $note ) Add note
addPhoneNumber ( string $number, $type = '' ) Add phone number
addPhoto ( string $url, boolean $include = true ) Add Photo
addRole ( string $role ) Add role
addURL ( string $url, $type = '' ) Add URL
buildVCalendar ( ) : string Build VCalender (.ics) - Safari (< iOS 8) can not open .vcf files, so we have build a workaround.
buildVCard ( ) : string Build VCard (.vcf)
download ( ) Download a vcard or vcal file to the browser.
get ( ) : string Get output as string
getCharset ( ) : string Get charset
getCharsetString ( ) : string Get charset string
getContentType ( ) : string Get content type
getFileExtension ( ) : string Get file extension
getFilename ( ) : string Get filename
getHeaders ( boolean $asAssociative ) : array Get headers
getOutput ( ) : string Get output as string iOS devices (and safari < iOS 8 in particular) can not read .vcf (= vcard) files.
getProperties ( ) : array Get properties
hasProperty ( string $key ) : boolean Has property
isIOS ( ) : boolean Is iOS - Check if the user is using an iOS-device
isIOS7 ( ) : boolean Is iOS less than 7 (should cal wrapper be returned)
save ( ) : void Save to a file
setCharset ( mixed $charset ) : void Set charset
setFilename ( mixed $value, boolean $overwrite = true, string $separator = '_' ) : void Set filename

보호된 메소드들

메소드 설명
escape ( string $text ) : string Escape newline characters according to RFC2425 section 5.8.4.
fold ( string $text ) : mixed Fold a line according to RFC2425 section 5.8.1.
getUserAgent ( ) : string Returns the browser user agent string.
shouldAttachmentBeCal ( ) : boolean Checks if we should return vcard in cal wrapper

비공개 메소드들

메소드 설명
addMedia ( string $property, string $url, boolean $include = true, $element ) Add a photo or logo (depending on property name)
decode ( string $value ) : string Decode
setProperty ( string $element, string $key, string $value ) : void Set property

메소드 상세

addAddress() 공개 메소드

Add address
public addAddress ( $name = '', $extended = '', $street = '', $city = '', $region = '', $zip = '', $country = '', $type = 'WORK;POSTAL' )

addBirthday() 공개 메소드

Add birthday
public addBirthday ( string $date )
$date string Format is YYYY-MM-DD

addCompany() 공개 메소드

Add company
public addCompany ( string $company )
$company string

addEmail() 공개 메소드

Add email
public addEmail ( string $address, $type = '' )
$address string The e-mail address

addJobtitle() 공개 메소드

Add jobtitle
public addJobtitle ( string $jobtitle )
$jobtitle string The jobtitle for the person.

addName() 공개 메소드

Add name
public addName ( $lastName = '', $firstName = '', $additional = '', $prefix = '', $suffix = '' )

addNote() 공개 메소드

Add note
public addNote ( string $note )
$note string

addPhoneNumber() 공개 메소드

Add phone number
public addPhoneNumber ( string $number, $type = '' )
$number string

addPhoto() 공개 메소드

Add Photo
public addPhoto ( string $url, boolean $include = true )
$url string image url or filename
$include boolean Include the image in our vcard?

addRole() 공개 메소드

Add role
public addRole ( string $role )
$role string The role for the person.

addURL() 공개 메소드

Add URL
public addURL ( string $url, $type = '' )
$url string

buildVCalendar() 공개 메소드

Build VCalender (.ics) - Safari (< iOS 8) can not open .vcf files, so we have build a workaround.
public buildVCalendar ( ) : string
리턴 string

buildVCard() 공개 메소드

Build VCard (.vcf)
public buildVCard ( ) : string
리턴 string

download() 공개 메소드

Download a vcard or vcal file to the browser.
public download ( )

escape() 보호된 메소드

Escape newline characters according to RFC2425 section 5.8.4.
protected escape ( string $text ) : string
$text string
리턴 string

fold() 보호된 메소드

Fold a line according to RFC2425 section 5.8.1.
protected fold ( string $text ) : mixed
$text string
리턴 mixed

get() 공개 메소드

Get output as string
사용 중단: in the future
public get ( ) : string
리턴 string

getCharset() 공개 메소드

Get charset
public getCharset ( ) : string
리턴 string

getCharsetString() 공개 메소드

Get charset string
public getCharsetString ( ) : string
리턴 string

getContentType() 공개 메소드

Get content type
public getContentType ( ) : string
리턴 string

getFileExtension() 공개 메소드

Get file extension
public getFileExtension ( ) : string
리턴 string

getFilename() 공개 메소드

Get filename
public getFilename ( ) : string
리턴 string

getHeaders() 공개 메소드

Get headers
public getHeaders ( boolean $asAssociative ) : array
$asAssociative boolean
리턴 array

getOutput() 공개 메소드

So I build a workaround to build a .ics (= vcalender) file.
public getOutput ( ) : string
리턴 string

getProperties() 공개 메소드

Get properties
public getProperties ( ) : array
리턴 array

getUserAgent() 보호된 메소드

Returns the browser user agent string.
protected getUserAgent ( ) : string
리턴 string

hasProperty() 공개 메소드

Has property
public hasProperty ( string $key ) : boolean
$key string
리턴 boolean

isIOS() 공개 메소드

Is iOS - Check if the user is using an iOS-device
public isIOS ( ) : boolean
리턴 boolean

isIOS7() 공개 메소드

Is iOS less than 7 (should cal wrapper be returned)
public isIOS7 ( ) : boolean
리턴 boolean

save() 공개 메소드

Save to a file
public save ( ) : void
리턴 void

setCharset() 공개 메소드

Set charset
public setCharset ( mixed $charset ) : void
$charset mixed
리턴 void

setFilename() 공개 메소드

Set filename
public setFilename ( mixed $value, boolean $overwrite = true, string $separator = '_' ) : void
$value mixed
$overwrite boolean [optional] Default overwrite is true
$separator string [optional] Default separator is an underscore '_'
리턴 void

shouldAttachmentBeCal() 보호된 메소드

Checks if we should return vcard in cal wrapper
protected shouldAttachmentBeCal ( ) : boolean
리턴 boolean

프로퍼티 상세

$charset 공개적으로 프로퍼티

Default Charset
public string $charset
리턴 string