12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
- <!--
- iCalcreator, a PHP rfc2445/rfc5545 solution.
- This file is a part of iCalcreator.
- Copyright (c) 2007-2017 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
- Link http://kigkonsult.se/iCalcreator/index.php
- Package iCalcreator
- Version 2.24
- License Subject matter of licence is the software iCalcreator.
- The above copyright, link, package and version notices,
- this licence notice and the [rfc5545] PRODID as implemented and
- invoked in iCalcreator shall be included in all copies or
- substantial portions of the iCalcreator.
- iCalcreator can be used either under the terms of
- a proprietary license, available at <https://kigkonsult.se/>
- or the GNU Affero General Public License, version 3:
- iCalcreator is free software: you can redistribute it and/or
- modify it under the terms of the GNU Affero General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
- iCalcreator is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public
- License along with this program.
- If not, see <http://www.gnu.org/licenses/>.
- -->
- <html>
- <head>
- <title>iCalcreator 2.24 manual</title>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <meta name="author" content="Kjell-Inge Gustafsson, kigkonsult, All rights reserved">
- <meta name="copyright" content="2007-2017 Kjell-Inge Gustafsson, kigkonsult">
- <meta name="keywords" content="ical, calendar, calender, xcal, xml, icalender, rfc2445, rfc5545, vcalender, php, create">
- <meta name="description" content="using iCalcreator v2.24">
- <style type="text/css">
- * {
- FONT-FAMILY : "Bitstream Vera Sans", Helvetica, "Lucida Grande","Lucida Sans Unicode", Lucida, Arial, Geneva, sans-serif;
- BACKGROUND-COLOR: white;
- COLOR : black;
- FONT-SIZE : small;
- }
- body {
- MARGIN-LEFT : 10px;
- WIDTH : 750px;
- }
- a.ref {
- BACKGROUND-COLOR: inherit;
- FONT-SIZE : 8pt;
- LETTER-SPACING : 0.1em;
- }
- h1 {
- BACKGROUND-COLOR: silver;
- BORDER : thin solid black;
- FONT-SIZE : x-large;
- FONT-WEIGHT : bold;
- DISPLAY : block;
- }
- h2 {
- FONT-SIZE : large;
- }
- h3 {
- FONT-SIZE : medium;
- }
- h4 {
- FONT-SIZE : small;
- FONT-WEIGHT : bold;
- }
- h5 {
- FONT-SIZE : small;
- FONT-WEIGHT : normal;
- TEXT-DECORATION : underline;
- }
- table {
- border-collapse : collapse;
- width : 100%;
- }
- .bb {
- BORDER-BOTTOM : gray dotted thin;
- }
- .blb {
- BORDER-LEFT : gray dotted thin;
- BORDER-BOTTOM : gray dotted thin;
- TEXT-ALIGN : center;
- }
- .bl {
- BORDER-LEFT : gray dotted thin;
- }
- .center {
- TEXT-ALIGN : center;
- }
- p.comment {
- FONT-FAMILY : monospace;
- FONT-SIZE : 9pt;
- FONT-WEIGHT : 500;
- WHITE-SPACE : pre-wrap; /* css-3 */
- WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
- WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
- WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
- WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
- }
- span.comment {
- BACKGROUND-COLOR: transparent;
- FONT-FAMILY : Areal;
- FONT-SIZE : 8pt;
- LETTER-SPACING : 0.2em;
- }
- p.example {
- BACKGROUND-COLOR: #DCDCDC;
- font-family : monospace;
- FONT-SIZE : 9pt;
- LETTER-SPACING : 0.1em;
- LINE-HEIGHT : 1.5em;
- WHITE-SPACE : pre-wrap; /* css-3 */
- WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
- WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
- WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
- WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
- }
- p.format, span.format {
- BORDER : gray dotted thin;
- FONT-FAMILY : Helvetica;
- FONT-SIZE : 9pt;
- LETTER-SPACING : 0.2em;
- LINE-HEIGHT : 2em;
- WHITE-SPACE : pre-wrap; /* css-3 */
- WHITE-SPACE : -moz-pre-wrap; /* Mozilla, since 1999 */
- WHITE-SPACE : -pre-wrap; /* Opera 4-6 */
- WHITE-SPACE : -o-pre-wrap; /* Opera 7 */
- WORD-WRAP : break-word; /* Internet Explorer 5.5+ */
- }
- .header {
- BACKGROUND-COLOR: silver;
- BORDER : thin solid black;
- FONT-SIZE : xx-large;
- }
- p.label {
- FONT-FAMILY : Arial;
- FONT-WEIGHT : bold;
- LETTER-SPACING : 0.1em;
- }
- p.quotes {
- BACKGROUND-COLOR: #F5F5F5;
- FONT-FAMILY : Arial;
- FONT-STYLE : italic;
- LETTER-SPACING : 0.1em;
- }
- sup {
- BACKGROUND-COLOR: transparent;
- FONT-SIZE : x-small;
- FONT-WEIGHT : bold;
- VERTICAL-ALIGN : super;
- }
- .ref {
- BACKGROUND-COLOR: transparent;
- FONT-SIZE : 8pt;
- LETTER-SPACING : 0.1em;
- }
- .top {
- VERTICAL-ALIGN : top;
- }
- </style>
- </head>
- <body>
- <a name="top"></a>
- <p class="header">iCalcreator v2.24</p>
- <p>
- iCalcreator v2.24<br>
- Copyright © 2007-2017 Kjell-Inge Gustafsson, kigkonsult, All rights reserved.<br>
- <a href="http://kigkonsult.se/iCalcreator/index.php" title="kigkonsult.se/iCalcreator" target="_blank">kigkonsult.se iCalcreator</a><br>
- <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se contact" target="_blank">kigkonsult.se contact</a>
- </p>
- <h2>Preface</h2>
- <p>
- This document describes usage of iCalcreator, a <em>PHP</em> software implementation of standards
- <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a> to manage iCal formatted files.
- </p>
- <p>
- This document is provided by kigkonsult for informational purposes
- and is provided on an "as is" basis without any warranties expressed or implied.
- </p>
- <p>
- Information in this document is subject to change without notice and does
- not represent a commitment on the part of kigkonsult.
- The software described in this document is provided under a <a href="#Copyright_and_Licence">license agreement</a>.
- The software may be used only in accordance with the terms of that <a href="#Copyright_and_Licence">license agreement</a>.
- It is against the law to copy or use the software except as specifically allowed in the <a href="#Copyright_and_Licence">license agreement</a>.
- </p>
- <p>
- It is the users responsibility to ensure the suitability of the software before using it.
- In no circumstances will kigkonsult be responsible for
- the use of the software's outcomes or results or any loss
- or damage of data or programs as a result of using the software.
- </p>
- <p>
- The use of the software implies acceptance of these terms and the <a href="#Copyright_and_Licence">license</a>.
- </p>
- <p>
- This document makes previous versions obsolete.
- </p>
- <a href="#INDEX">[index]</a></a>
- <a name="INTRO"></a><h1>1 INTRO</h1>
- <p>
- iCalcreator is a <em>PHP</em> class package managing iCal files, supporting (non-)<strong>calendar</strong>
- systems and applications to process and communicate <strong>calendar</strong> information like
- events, agendas, tasks, reports, totos and journaling information.
- </p>
- <p>
- The iCal standards are <a href="#Standards">rfc5545/rfc5546 (rfc2445/rfc2446)</a>.</p>
- <p>
- iCalcreator features create, parse, edit and select <strong>calendar</strong> and <strong>calendar</strong> components.
- </p>
- <p>
- For iCalcreator 2.24 version (and later), <em>PHP</em> version >= 5.4 is required.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Standards"></a><h2>1.1 Standards</h2>
- <h4>iCal</h4>
- <p>
- A short iCal description is found at <a href="http://en.wikipedia.org/wiki/ICalendar#Core_object" title="iCalendar From Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
- If You are not familiar with iCal, read this first!
- </p>
- <p>
- The <strong>iCalendar</strong> format, <strong>iCal</strong>, are described in
- </p>
- <dl>
- <dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a>
- <dd>"Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)"
- <dt><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
- <dd>"iCalendar Transport-Independent Interoperability Protocol (iTIP)"<br>Scheduling Events, BusyTime, To-dos and Journal Entries
- <p class="quotes">. ..allows for the capture and exchange of information normally stored
- within a calendaring and scheduling application.</p>
- and
- <p class="quotes">. ..is an exchange format between applications or systems.</p>
- </dl>
- <p><a href="http://kigkonsult.se/downloads/dl.php?f=rfc5545" title="Download RFC5545 in text format" target="_blank">rfc5545</a> and
- <a href="http://kigkonsult.se/downloads/dl.php?f=rfc5546" title="Download RFC5546 in text format" target="_blank">rfc5546</a>
- obsoletes, respectively,
- <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="Download RFC2445 in text format" target="_blank">rfc2445</a> and
- <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2446" title="Download RFC2446 in text format" target="_blank">rfc2446</a>.
- </p>
- <p>
- Any references to rfc2445, below, corresponds to rfc5545.
- </p>
- <h4>xCal</h4>
- <p>
- iCalcreator also supports xCal (iCal xml),
- <a href="http://kigkonsult.se/downloads/dl.php?f=rfc6321" title="Download RFC6321 in text format" target="_blank">rfc6321</a>,
- The XML Format for <strong>iCalendar</strong>.
- </p>
- <p>
- A short xCal description is found at <a href="http://en.wikipedia.org/wiki/XCal" title="xCal on Wikipedia, the free encyclopedia" target="_blank">Wikipedia</a>.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="This_manual"></a><h2>1.2 This manual</h2>
- <p>This style is used for text.</p>
- <p class="format">This style is used for formats.</p>
- <p class="example">
- This style is used for <em>PHP</em> coding examples.
- <span class="comment"> // this style is used for coding comments.</span>
- </p>
- <p class="comment">This style is used for content details.</p>
- <p class="quotes">This style is used for RFC2445/5545 quotes.</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Versioning"></a><h2>1.3 Versioning</h2>
- <p>The release numbering convention used is major.minor(.micro / suffix).</p>
- <dl>
- <dt>Major
- <dd>Indicates a very large change in the core package. Rewrites or major milestones.
- <dt>Minor
- <dd>Significant amount of feature addition/modification.<br>odd number - development/experimental release<br> even number - production release
- <dt>Micro
- <dd>Primarily bug fix and maintenance number.
- <dt>Suffix
- <dd>rc1 for first release candidate etc.
- </dl>
- <p>The release plan is based on yearly releases with exception of emergency releases.</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Support"></a><h2>1.4 Support</h2>
- <p>
- Previous iCalcreator releases are supported upon (paid) request only.
- </p>
- <p>
- Use
- <a href="http://kigkonsult.se/contact/index.php" title="kigkonsult.se/contact" target="_blank">kigkonsult.se/contact</a>
- or
- <a href="https://github.com/iCalcreator/iCalcreator/issues" title="github" target="_blank"> github.com/iCalcreator</a>
- for improvement/development issues or professional support and development.
- Please note that paid support or consulting service has the highest priority.
- </p>
- <p>
- kigkonsult offer professional services for software support, design and new/re-development, customizations and adaptations
- of <em>PHP</em>/<em>MySQL</em> solutions with focus on software lifecycle management, including long term utility, reliability and maintainability.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Donate"></a><h2>1.5 Donate</h2>
- <p>
- You can show your appreciation for our free software,
- and can support future development by making a donation to the kigkonsult project iCalcreator.
- </p>
- <p>
- Make a donation of any size by clicking <a href="http://kigkonsult.se/contact/index.php#Donate" title="Donate" target="_blank">here</a>.
- Thanks in advance!
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="INSTALL"></a><h2>1.6 Install</h2>
- <dl>
- <dt>Composer (https://getcomposer.org/)
- <dd>
- <dd>composer require kigkonsult/iCalcreator
- <dd>
- <dt>Or
- <dd> include the (download) iCalcreator folder to your include-path
- <dd>Add
- <dd><span class="format">require_once "[path/]iCalcreator-2.24/autoload.php";</span>
- <dd>to your <em>PHP</em>-script.
- <dd>The iCalcreator invoker has changed since previous version!
- </dl>
- <p>
- iCalcreator is encapsulated in <em>PHP</em> namespace "kigkonsult\iCalcreator\".
- </p>
- <p>
- You may need to set the default timezone.
- When creating a new iCalcreator object instance/component instance, review <a href="#iCalcreator_configuration_methods">config</a> settings.
- </p>
- <p>
- There are free iCal icons (use as buttons on a web page?) to download
- <a href="http://kigkonsult.se/downloads/i.php?i=all" title="iCal images" target="_blank">here</a>.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Additional_Descriptors"></a><h2>1.7 Additional Descriptors</h2>
- <p>Some properties (ex. as described in
- <a href="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" title="http://en.wikipedia.org/wiki/ICalendar#Calendar_extensions" target="_blank">wikipedia:iCal</a>)
- may be required when importing iCal files into some calendaring software (MS etc). Also <a href="#X-PROPERTY">X-properties</a> may appear in exports. Below are examples</p>
- <dl>
- <dt>on <strong>calendar</strong> level
- <dd><a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
- <dd><a href="#X-PROPERTY">X-WR-CALNAME</a> x-property
- <dd><a href="#X-PROPERTY">X-WR-CALDESC</a> x-property
- <dd><a href="#X-PROPERTY">X-WR-RELCALID</a> x-property <span class="comment">(Read more info about <a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" title="Universally Unique Identifier">UUID</a>.)</span>
- <dd><a href="#X-PROPERTY">X-WR-TIMEZONE</a> x-property
- <dt>on component level
- <dd><a href="#DTSTAMP">DTSTAMP</a> <sup>*</sup>
- <dd><a href="#UID">UID</a> <sup>*</sup>
- <dt>on component level in a <a href="#VTIMEZONE">vtimezone</a> component
- <dd><a href="#X-PROPERTY">X-LIC-LOCATION</a> x-property
- </dl>
- <sup>*</sup>
- Created automatically in iCalcreator, if not set.
- <p class="label">Example</p>
- <p>
- A strong recommendation is also to set config <a href="#Unique_id">unique_id</a> when creating a new vcalendar/component instance,
- to ensure accurate setting of all components <a href="#UID">UID</a> property, especially before <a href="#parse_merge">parse</a>.
- Also setting of config timezone ("TZID" and "X-WR-TIMEZONE" below) is to recommend.
- </p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->setProperty( kigkonsult\iCalcreator\util\util::$METHOD,
- "PUBLISH" );
- $vcalendar->setProperty( "x-wr-calname",
- "Calendar Sample" );
- $vcalendar->setProperty( "X-WR-CALDESC",
- "Calendar Description" );
- $vcalendar->setProperty( "X-WR-RELCALID",
- "3E26604A-50F4-4449-8B3E-E4F4932D05B5";
- $vcalendar->setProperty( "X-WR-TIMEZONE",
- "Europe/Stockholm" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="INDEX"></a><h2>1.9 INDEX</h2>
- <a href="#INTRO">1 INTRO</a><br>
- <br>
- <a href="#Standards">1.1 Standards</a><br>
- <a href="#This_manual">1.2 This manual</a><br>
- <a href="#Versioning">1.3 Versioning</a><br>
- <a href="#Support">1.4 Support</a><br>
- <a href="#Donate">1.5 Donate</a><br>
- <a href="#INSTALL">1.6 Install</a><br>
- <a href="#Additional_Descriptors">1.7 Additional_Descriptors</a><br>
- <a href="#INDEX">1.9 INDEX</a><br>
- <br>
- <a href="#Calendar_Component_list">2 Calendar Component list</a><br>
- <br>
- <a href="#VCALENDAR">2.1 VCALENDAR</a><br>
- <a href="#VEVENT">2.2 VEVENT</a><br>
- <a href="#VTODO">2.3 VTODO</a><br>
- <a href="#VJOURNAL">2.4 VJOURNAL</a><br>
- <a href="#VFREEBUSY">2.5 VFREEBUSY</a><br>
- <a href="#VALARM">2.6 VALARM</a><br>
- <a href="#VTIMEZONE">2.7 VTIMEZONE</a><br>
- <a href="#CalProps">2.8 Component Properties</a><br>
- <br>
- <a href="#Function_list">3 Function list</a><br>
- <br>
- <a href="#iCalcreator_object_methods">3.1 iCalcreator object methods</a><br>
- <br>
- <a href="#Calendar_object_constructors">3.1.1 Constructors</a><br>
- <a href="#vcalendar_constr">3.1.1.1 vcalendar</a><br>
- <a href="#vevent_constr">3.1.1.2 vevent</a><br>
- <a href="#vtodo_constr">3.1.1.3 vtodo</a><br>
- <a href="#vjournal_constr">3.1.1.4 vjournal</a><br>
- <a href="#vfreebusy_constr">3.1.1.5 vfreebusy</a><br>
- <a href="#valarm_constr">3.1.1.6 valarm</a><br>
- <a href="#vtimezone_constr">3.1.1.7 vtimezone</a><br>
- <a href="#standard_daylight_constr">3.1.1.8 standard / daylight</a><br>
- <br>
- <a href="#iCalcreator_object_property_methods">3.1.2 iCalcreator object property methods</a><br>
- <a href="#deleteProperty">3.1.2.1 deleteProperty</a><br>
- <a href="#getProperty">3.1.2.2 getProperty</a><br>
- <a href="#setProperty">3.1.2.3 setProperty</a><br>
- <a href="#CALSCALE">3.1.2.4 CALSCALE</a><br>
- <a href="#METHOD">3.1.2.5 METHOD</a><br>
- <a href="#VERSION">3.1.2.6 VERSION</a><br>
- <a href="#X-PROPERTY">3.1.2.7 X-PROPERTY</a><br>
- <br>
- <a href="#iCalcreator_component_object_methods">3.1.3 iCalcreator component object methods</a><br>
- <a href="#deleteComponent">3.1.3.1 deleteComponent</a><br>
- <a href="#getComponent">3.1.3.2 getComponent</a><br>
- <a href="#newComponent">3.1.3.3 newComponent</a><br>
- <a href="#replaceComponent">3.1.3.4 replaceComponent</a><br>
- <a href="#selectComponents">3.1.3.5 selectComponents</a><br>
- <a href="#setComponent">3.1.3.6 setComponent</a><br>
- <br>
- <a href="#iCalcreator_calendar_methods">3.1.4 iCalcreator calendar methods</a><br>
- <a href="#parse_merge">3.1.4.1 parse and merge</a><br>
- <a href="#createCalendar">3.1.4.2 createCalendar</a><br>
- <a href="#returnCalendar">3.1.4.3 returnCalendar</a><br>
- <a href="#saveCalendar">3.1.4.4 saveCalendar</a><br>
- <a href="#sort">3.1.4.5 sort</a><br>
- <a href="#useCachedCalendar">3.1.4.6 useCachedCalendar</a><br>
- <a href="#iCalcreatorVersion">3.1.4.7 iCalcreatorVersion</a><br>
- <br>
- <a href="#iCalcreator_configuration_methods">3.1.5 iCalcreator configuration methods</a><br>
- <a href="#configKeys">3.1.5.1 configuration keys</a><br>
- <a href="#getConfig">3.1.5.2 getConfig</a><br>
- <a href="#initConfig">3.1.5.3 calendar/component initialization</a><br>
- <a href="#setConfig">3.1.5.4 setConfig</a><br>
- <a href="#allowEmpty">3.1.5.5 Allow empty components</a><br>
- <a href="#Compsinfo">3.1.5.6 Component information</a><br>
- <a href="#Delimiter">3.1.5.7 Delimiter</a><br>
- <a href="#Directory">3.1.5.8 Directory</a><br>
- <a href="#Dirfile">3.1.5.9 Dirfile</a><br>
- <a href="#Fileinfo">3.1.5.10 Fileinfo</a><br>
- <a href="#Filename">3.1.5.11 Filename</a><br>
- <a href="#Filesize">3.1.5.12 Filesize</a><br>
- <a href="#Language">3.1.5.13 Language</a><br>
- <a href="#setPropertyNames">3.1.5.14 setPropertyNames</a><br>
- <a href="#dTZID">3.1.5.15 TZID</a><br>
- <a href="#Unique_id">3.1.5.16 Unique_id</a><br>
- <a href="#configURL">3.1.5.17 URL</a><br>
- <br>
- <a href="#Calendar_component_object_property_function_list">3.2 Calendar component property method list</a><br>
- <a href="#deleteProperty_PROP">3.2.1 deleteProperty</a><br>
- <a href="#getProperty_PROP">3.2.2 getProperty</a><br>
- <a href="#parse">3.2.3 parse</a><br>
- <a href="#setProperty_PROP">3.2.4 setProperty</a>
- <dl>
- <dt>Ascending property order
- <dd><a href="#ACTION">3.2.5 ACTION</a>
- <dd><a href="#ATTACH">3.2.6 ATTACH</a>
- <dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
- <dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
- <dd><a href="#CLASS">3.2.9 CLASS</a>
- <dd><a href="#COMMENT">3.2.10 COMMENT</a>
- <dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
- <dd><a href="#CONTACT">3.2.12 CONTACT</a>
- <dd><a href="#CREATED">3.2.13 CREATED</a>
- <dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
- <dd><a href="#DTEND">3.2.15 DTEND</a>
- <dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
- <dd><a href="#DTSTART">3.2.17 DTSTART</a>
- <dd><a href="#DUE">3.2.18 DUE</a>
- <dd><a href="#DURATION">3.2.19 DURATION</a>
- <dd><a href="#EXDATE">3.2.20 EXDATE</a>
- <dd><a href="#EXRULE">3.2.21 EXRULE</a>
- <dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
- <dd><a href="#GEO">3.2.23 GEO</a>
- <dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
- <dd><a href="#LOCATION">3.2.25 LOCATION</a>
- <dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
- <dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
- <dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
- <dd><a href="#RDATE">3.2.29 RDATE</a>
- <dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
- <dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
- <dd><a href="#REPEAT">3.2.32 REPEAT</a>
- <dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
- <dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
- <dd><a href="#RRULE">3.2.35 RRULE</a>
- <dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
- <dd><a href="#STATUS">3.2.37 STATUS</a>
- <dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
- <dd><a href="#TRANSP">3.2.39 TRANSP</a>
- <dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
- <dd><a href="#TZID">3.2.41 TZID</a>
- <dd><a href="#TZNAME">3.2.42 TZNAME</a>
- <dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
- <dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
- <dd><a href="#TZURL">3.2.45 TZURL</a>
- <dd><a href="#UID">3.2.46 UID</a>
- <dd><a href="#URL">3.2.47 URL</a>
- <dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
- <dt>Descriptive Component Properties
- <dd><a href="#ATTACH">3.2.6 ATTACH</a>
- <dd><a href="#CATEGORIES">3.2.8 CATEGORIES</a>
- <dd><a href="#COMMENT">3.2.10 COMMENT</a>
- <dd><a href="#DESCRIPTION">3.2.14 DESCRIPTION</a>
- <dd><a href="#GEO">3.2.23 GEO</a>
- <dd><a href="#LOCATION">3.2.25 LOCATION</a>
- <dd><a href="#PERCENT-COMPLETE">3.2.27 PERCENT-COMPLETE</a>
- <dd><a href="#PRIORITY">3.2.28 PRIORITY</a>
- <dd><a href="#RESOURCES">3.2.34 RESOURCES</a>
- <dd><a href="#STATUS">3.2.37 STATUS</a>
- <dd><a href="#SUMMARY">3.2.38 SUMMARY</a>
- <dt>Date and Time Component Properties
- <dd><a href="#COMPLETED">3.2.11 COMPLETED</a>
- <dd><a href="#DTEND">3.2.15 DTEND</a>
- <dd><a href="#DUE">3.2.18 DUE</a>
- <dd><a href="#DTSTART">3.2.17 DTSTART</a>
- <dd><a href="#DURATION">3.2.19 DURATION</a>
- <dd><a href="#FREEBUSY_PROP">3.2.22 FREEBUSY</a>
- <dd><a href="#TRANSP">3.2.39 TRANSP</a>
- <dt>Time Zone Component Properties
- <dd><a href="#TZID">3.2.41 TZID</a>
- <dd><a href="#TZNAME">3.2.42 TZNAME</a>
- <dd><a href="#TZOFFSETFROM">3.2.43 TZOFFSETFROM</a>
- <dd><a href="#TZOFFSETTO">3.2.44 TZOFFSETTO</a>
- <dd><a href="#TZURL">3.2.45 TZURL</a>
- <dt>Relationship Component Properties
- <dd><a href="#ATTENDEE">3.2.7 ATTENDEE</a>
- <dd><a href="#CONTACT">3.2.12 CONTACT</a>
- <dd><a href="#ORGANIZER">3.2.26 ORGANIZER</a>
- <dd><a href="#RECURRENCE-ID">3.2.30 RECURRENCE-ID</a>
- <dd><a href="#RELATED-TO">3.2.31 RELATED-TO</a>
- <dd><a href="#URL">3.2.47 URL</a>
- <dd><a href="#UID">3.2.46 UID</a>
- <dt>Recurrence Component Properties
- <dd><a href="#EXDATE">3.2.20 EXDATE</a>
- <dd><a href="#RDATE">3.2.29 RDATE</a>
- <dd><a href="#RRULE">3.2.35 RRULE</a>
- <dt>Alarm Component Properties
- <dd><a href="#ACTION">3.2.5 ACTION</a>
- <dd><a href="#REPEAT">3.2.32 REPEAT</a>
- <dd><a href="#TRIGGER">3.2.40 TRIGGER</a>
- <dt>Change Management Component Properties
- <dd><a href="#CREATED">3.2.13 CREATED</a>
- <dd><a href="#DTSTAMP">3.2.16 DTSTAMP</a>
- <dd><a href="#LAST-MODIFIED">3.2.24 LAST-MODIFIED</a>
- <dd><a href="#SEQUENCE">3.2.36 SEQUENCE</a>
- <dt>Miscellaneous Component Properties
- <dd><a href="#X-PROPERTY_PROP">3.2.48 X-PROPERTY</a>
- <dd><a href="#REQUEST-STATUS">3.2.33 REQUEST-STATUS</a>
- </dl>
- <a href="#iCalcreator_component_configuration_methods">3.3 iCalcreator Component configuration methods</a><br>
- <a href="#Language_PROP">3.3.1 Language</a><br>
- <br>
- <a href="#iCalcreator_component_object_misc_methods">3.4 iCalcreator component object misc. methods</a><br>
- <a href="#deleteComponent_PROP">3.4.1 deleteComponent</a><br>
- <a href="#getComponent_PROP">3.4.2 getComponent</a><br>
- <a href="#newComponent_PROP">3.4.3 newComponent</a><br>
- <a href="#setComponent_PROP">3.4.4 setComponent</a><br>
- <br>
- <a href="#TimezoneXMLjsonvCard">4 Timezone, XML, json and vCard support</a><br>
- <a href="#timezoneHandler">4.1 iCalcreator and timezoneHandler class</a><br>
- <a href="#createTimezone">4.1.1 createTimezone</h4></a><br>
- <a href="#ms2phpTZ">4.1.2 ms2phpTZ</a><br>
- <a href="#transformDateTime">4.1.3 transformDateTime</a><br>
- <a href="#TZhelpers">4.2 Timezone helper functions</a><br>
- <a href="#getTzOffsetForDate">4.2.1 getTzOffsetForDate</a><br>
- <a href="#getTimezonesAsDateArrays">4.2.2 getTimezonesAsDateArrays</a><br>
- <a href="#XMLhelpers">4.3 iCalcreator and iCalXML class</a><br>
- <a href="#iCal2XML">4.3.1 iCal2XML</a><br>
- <a href="#XML2iCal">4.3.2 XML2iCal</a><br>
- <a href="#iCal2jSon">4.4 iCalcreator and json export</a><br>
- <a href="#vCardhelpers">4.5 iCalcreator and iCalvCard class</a><br>
- <a href="#iCal2vCard">4.5.1 iCal2vCard</a><br>
- <a href="#iCal2vCards">4.5.2 iCal2vCards</a><br>
- <br>
- <a href="#Copyright_and_Licence">5 COPYRIGHT AND LICENSE</a><br>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a>
- <a name="Calendar_Component_list"></a><h1>2 Calendar Component list</h1>
- <p>
- To ease up usage, You will find convenient holders for component names,
- properties, config keys etc in top of the "util" class file (src/util/util.php),
- used in code snippets.
- </p>
- <p>
- Quote from <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a>
- - Internet Calendaring and Scheduling Core Object Specification (<strong>iCalendar</strong>)!
- </p>
- <a name="VCALENDAR"></a><h2>2.1 VCALENDAR</h2>
- <p class="center">icalobject = 1*("BEGIN" ":" "VCALENDAR" CRLF</p>
- <p class="center">icalbody</p>
- <p class="center">"END" ":" "VCALENDAR" CRLF)</p>
- <p>icalbody = calprops component</p>
- <p>calprops = 2*(</p>
- <p class="center">"prodid" and "version" are both REQUIRED, but MUST NOT occur more than once
- <p class="center">prodid / <a href="#VERSION">version</a> /</p>
- <p class="center">"calscale"and "method"are optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#CALSCALE">calscale</a> / <a href="#METHOD">method</a> /</p>
- <p class="center"><a href="#X-PROPERTY">x-prop</a></p>
- <p>)</p>
- <p class="center">component = 1*(<a href="#VEVENT">eventc</a> / <a href="#VTODO">todoc</a> / <a href="#VJOURNAL">journalc</a> / <a href="#VFREEBUSY">freebusyc</a> / <a href="#VTIMEZONE">timezonec</a> / iana-comp* / x-comp*)</p>
- <p class="center">iana-comp = "BEGIN" ":" iana-token CRLF</p>
- <p class="center">1*contentline</p>
- <p class="center">"END" ":" iana-token CRLF</p>
- <p class="center">x-comp = "BEGIN" ":" x-name CRLF</p>
- <p class="center">1*contentline</p>
- <p class="center">"END" ":" x-name CRLF</p>
- <p>*) <span class="comment">not supported by iCalcreator</span></p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VEVENT"></a><h2>2.2 VEVENT</h2>
- <p class="center">"BEGIN" ":" "VEVENT" CRLF</p>
- <p class="center">eventprop *alarmc</p>
- <p class="center">"END" ":" "VEVENT" CRLF</p>
- <p>eventprop = *(</p>
- <p class="center">the following are optional,but MUST NOT occur more than once</p>
- <p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> /</p>
- <p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PRIORITY">priority</a> / </p>
- <p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> / </p>
- <p class="center"><a href="#TRANSP">transp</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / <a href="#RECURRENCE-ID">recurid</a> /</p>
- <p class="center">either "<a href="#DTEND">dtend</a>" or "<a href="#DURATION">duration</a>" may appear in a "eventprop", </p>
- <p class="center">but "<a href="#DTEND">dtend</a>" and "<a href="#DURATION">duration</a>" MUST NOT occur in the same "eventprop"</p>
- <p class="center"><a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> /</p>
- <p class="center">the following are optional, and MAY occur more than once</p>
- <p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
- <p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
- <p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VTODO"></a><h2>2.3 VTODO</h2>
- <p class="center">"BEGIN" ":" "VTODO" CRLF</p>
- <p class="center">todoprop *alarmc</p>
- <p class="center">"END" ":" "VTODO" CRLF</p>
- <p>todoprop = *(</p>
- <p class="center">the following are optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#CLASS">class</a> / <a href="#COMPLETED">completed</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTAMP">dtstamp</a> / <a href="#DTSTART">dtstart</a> / </p>
- <p class="center"><a href="#GEO">geo</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#LOCATION">location</a> / <a href="#ORGANIZER">organizer</a> / <a href="#PERCENT-COMPLETE">percent</a> / <a href="#PRIORITY">priority</a> / </p>
- <p class="center"><a href="#RECURRENCE-ID">recurid</a> / <a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
- <p class="center">either "<a href="#DUE">due</a>" or "<a href="#DURATION">duration</a>" may appear in a "todoprop",</p>
- <p class="center"> but "<a href="#DUE">due</a>" and "<a href="#DURATION">duration</a>" MUST NOT occur in the same "todoprop"</p>
- <p class="center"><a href="#DUE">due</a> / <a href="#DURATION">duration</a> /</p>
- <p class="center">the following are optional,and MAY occur more than once</p>
- <p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> / </p>
- <p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / </p>
- <p class="center"><a href="#RELATED-TO">related</a> / <a href="#RESOURCES">resources</a> / <a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VJOURNAL"></a><h2>2.4 VJOURNAL</h2>
- <p class="center">journalc = "BEGIN" ":" "VJOURNAL" CRLF</p>
- <p class="center">jourprop</p>
- <p class="center">"END" ":" "VJOURNAL" CRLF</p>
- <p>jourprop = *(</p>
- <p class="center">the following are optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#CLASS">class</a> / <a href="#CREATED">created</a> / <a href="#DESCRIPTION">description</a> / <a href="#DTSTART">dtstart</a> / </p>
- <p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#LAST-MODIFIED">last-mod</a> / <a href="#ORGANIZER">organizer</a> / <a href="#RECURRENCE-ID">recurid</a> / </p>
- <p class="center"><a href="#SEQUENCE">seq</a> / <a href="#STATUS">status</a> / <a href="#SUMMARY">summary</a> /<a href="#UID">uid</a> / <a href="#URL">url</a> /</p>
- <p class="center">the following are optional,and MAY occur more than once</p>
- <p class="center"><a href="#ATTACH">attach</a> / <a href="#ATTENDEE">attendee</a> / <a href="#CATEGORIES">categories</a> / <a href="#COMMENT">comment</a> /</p>
- <p class="center"><a href="#CONTACT">contact</a> / <a href="#EXDATE">exdate</a> / <a href="#EXRULE">exrule</a> / <a href="#RELATED-TO">related</a> / </p>
- <p class="center"><a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VFREEBUSY"></a><h2>2.5 VFREEBUSY</h2>
- <p class="center">"BEGIN" ":" "VFREEBUSY" CRLF</p>
- <p class="center">fbprop</p>
- <p class="center">"END" ":" "VFREEBUSY" CRLF</p>
- <p>fbprop = *(</p>
- <p class="center">the following are optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#CONTACT">contact</a> / <a href="#DTSTART">dtstart</a> / <a href="#DTEND">dtend</a> / <a href="#DURATION">duration</a> / </p>
- <p class="center"><a href="#DTSTAMP">dtstamp</a> / <a href="#ORGANIZER">organizer</a> / <a href="#UID">uid</a> / <a href="#URL">url</a> / </p>
- <p class="center">the following are optional,and MAY occur more than once</p>
- <p class="center"><a href="#ATTENDEE">attendee</a> / <a href="#COMMENT">comment</a> / <a href="#FREEBUSY_PROP">freebusy</a> / <a href="#REQUEST-STATUS">rstatus</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VALARM"></a><h2>2.6 VALARM</h2>
- <p class="center">"BEGIN" ":" "VALARM" CRLF</p>
- <p class="center">(audioprop / dispprop / emailprop / procprop)</p>
- <p class="center">"END" ":" "VALARM" CRLF</p>
- <p>audioprop = 2*(</p>
- <p class="center">"<a href="#ACTION">action</a>" and "<a href="#TRIGGER">trigger</a>" are both REQUIRED, but MUST NOT occur more than once</p>
- <p class="center"><a href="#ACTION">action</a> / <a href="#TRIGGER">trigger</a> /</p>
- <p class="center">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" are both optional,and MUST NOT occur more than once each,</p>
- <p class="center">but if one occurs, so MUST the other</p>
- <p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
- <p class="center">the following is optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#ATTACH">attach</a> / </p>
- <p class="center">the following is optional, and MAY occur more than once</p>
- <p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <p>dispprop = 3*(</p>
- <p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
- <p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> /</p>
- <p class="center">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" are both optional,and MUST NOT occur more than once each,</p>
- <p class="center">but if one occurs, so MUST the other</p>
- <p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
- <p class="center">the following is optional, and MAY occur more than once</p>
- <p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <p>emailprop = 5*(</p>
- <p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
- <p class="center"><a href="#ACTION">action</a> / <a href="#DESCRIPTION">description</a> / <a href="#TRIGGER">trigger</a> / <a href="#SUMMARY">summary</a></p>
- <p class="center">the following is REQUIRED, and MAY occur more than once</p>
- <p class="center"><a href="#ATTENDEE">attendee</a> / </p>
- <p class="center">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" are both optional, and MUST NOT occur more than once each,</p>
- <p class="center">but if one occurs, so MUST the other</p>
- <p class="center"><a href="#DURATION">duration</a> / <a href="#REPEAT">repeat</a> /</p>
- <p class="center">the following are optional, and MAY occur more than once</p>
- <p class="center"><a href="#ATTACH">attach</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <p>procprop = 3*(</p>
- <p class="center">the following are all REQUIRED, but MUST NOT occur more than once</p>
- <p class="center"><a href="#ACTION">action</a> / <a href="#ATTACH">attach</a> / <a href="#TRIGGER">trigger</a> /</p>
- <p class="center">"<a href="#DURATION">duration</a>" and "<a href="#REPEAT">repeat</a>" are both optional, and MUST NOT occur more than once each,</p>
- <p class="center">but if one occurs, so MUST the other</p>
- <p class="center"><a href="#DURATION">duration</a> /
- <a href="#REPEAT">repeat</a> /</p>
- <p class="center">"<a href="#DESCRIPTION">description</a>" is optional, and MUST NOT occur more than once</p>
- <p class="center"><a href="#DESCRIPTION">description</a> / </p>
- <p class="center">the following is optional, and MAY occur more than once</p>
- <p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="VTIMEZONE"></a><h2>2.7 VTIMEZONE</h2>
- <p class="center">"BEGIN" ":" "VTIMEZONE" CRLF</p>
- <p>2*(</p>
- <p class="center">"<a href="#TZID">tzid</a>" is required, but MUST NOT occur more than once</p>
- <p class="center"><a href="#TZID">tzid</a> / </p>
- <p class="center">"<a href="#LAST-MODIFIED">last-mod</a>" and "<a href="#TZURL">tzurl</a>" are optional, but MUST NOT occur more than once</p>
- <p class="center"><a href="#LAST-MODIFIED">last-mod</a> / <a href="#TZURL">tzurl</a> /</p>
- <p class="center">one of "standardc" or "daylightc" MUST occur and each MAY occur more than once.</p>
- <p class="center">standardc / daylightc /</p>
- <p class="center">the following is optional, and MAY occur more than once</p>
- <p class="center"><a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <p class="center">"END" ":" "VTIMEZONE" CRLF</p>
- <p class="center">standardc = "BEGIN" ":" "STANDARD" CRLF</p>
- <p class="center">tzprop</p>
- <p class="center">"END" ":" "STANDARD" CRLF</p>
- <p class="center">daylightc = "BEGIN" ":" "DAYLIGHT" CRLF</p>
- <p class="center">tzprop</p>
- <p class="center">"END" ":" "DAYLIGHT" CRLF</p>
- <p>tzprop = 3*(</p>
- <p class="center">the following are each REQUIRED, but MUST NOT occur more than once</p>
- <p class="center"><a href="#DTSTART">dtstart</a> / <a href="#TZOFFSETTO">tzoffsetto</a> / <a href="#TZOFFSETFROM">tzoffsetfrom</a> /</p>
- <p class="center">the following are optional, and MAY occur more than once</p>
- <p class="center"><a href="#COMMENT">comment</a> /<a href="#RDATE">rdate</a> / <a href="#RRULE">rrule</a> / <a href="#TZNAME">tzname</a> / <a href="#X-PROPERTY_PROP">x-prop</a></p>
- <p>)</p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="CalProps"></a><h2>2.8 Component Properties</h2>
- <p>
- A comprehensive table showing relation between <strong>calendar</strong> components and properties.
- <a href="#VTIMEZONE">vtimezone</a> properties are not included.
- </p>
- <table>
- <tr>
- <td>0-1</td>
- <td colspan="8">OPTIONAL property, MUST NOT occur more than once.</td>
- </tr>
- <tr>
- <td>0-m</td>
- <td colspan="8">OPTIONAL property, MAY occur more than once.</td>
- </tr>
- <tr>
- <td>0 / 1=1</td>
- <td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST the other</td>
- </tr>
- <tr>
- <td>0*1</td>
- <td colspan="8">A pair of OPTIONAL properties, MUST NOT occur more than once each.<br>If one occurs, so MUST NOT the other</td>
- </tr>
- <tr>
- <td>1-m</td>
- <td colspan="8">REQUIRED property, MAY occur more than once.</td>
- </tr>
- <tr>
- <td>1</td>
- <td colspan="8">REQUIRED property, MUST NOT occur more than once.</td>
- </tr>
- <tr>
- <td colspan="9"> </td>
- </tr>
- <tr>
- <td> </td>
- <td class="bl bb center top" rowspan="2"><a class="ref" href="#VEVENT">v<br>e<br>v<br>e<br>n<br>t</a></td>
- <td class="bl bb center top" rowspan="2"><a class="ref" href="#VTODO">v<br>t<br>o<br>d<br>o</a></td>
- <td class="bl bb center top" rowspan="2"><a class="ref" href="#VJOURNAL">v<br>j<br>o<br>u<br>r<br>n<br>a<br>l</a></td>
- <td class="bl bb center top" rowspan="2"><a class="ref" href="#VFREEBUSY">v<br>f<br>r<br>e<br>e<br>b<br>u<br>s<br>y</a></td>
- <td class="bl top center" colspan="4"><a class="ref" href="#VALARM">v a l a r m</a></td>
- </tr>
- <tr>
- <td class="bb"> </td>
- <td class="bl bb center ref"><br><br><br><br>a<br>u<br>d<br>i<br>o</td>
- <td class="bl bb center ref"><br><br>d<br>i<br>s<br>p<br>l<br>a<br>y</td>
- <td class="bl bb center ref"><br><br><br><br>e<br>m<br>a<br>i<br>l</td>
- <td class="bl bb center ref">p<br>r<br>o<br>c<br>e<br>d<br>u<br>r<br>e</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#ACTION">action</a></td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#ATTACH">attach</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb">0-m</td>
- <td class="blb">1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#ATTENDEE">attendee</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">1-m</td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#CATEGORIES">categories</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#CLASS">class</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#COMMENT">comment</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#COMPLETED">completed</a></td>
- <td class="blb"> </td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#CONTACT">contact</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#CREATED">created</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DESCRIPTION">description</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- <td class="blb">0-1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DTEND">dtend</a></td>
- <td class="blb">0*1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DTSTAMP">dtstamp</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DTSTART">dtstart</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DUE">due</a></td>
- <td class="blb"> </td>
- <td class="blb">0*1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#DURATION">duration</a></td>
- <td class="blb">0*1</td>
- <td class="blb">0*1</td>
- <td class="blb"> </td>
- <td class="blb">0-1</td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#EXDATE">exdate</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#EXRULE">exrule</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#FREEBUSY_PROP">freebusy</a></td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#GEO">geo</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#LAST-MODIFIED">last-mod</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"></td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#LOCATION">location</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#ORGANIZER">organizer</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#PERCENT-COMPLETE">percent</a></td>
- <td class="blb"> </td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#PRIORITY">priority</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#RDATE">rdate</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#RECURRENCE-ID">recurid</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#RELATED-TO">related</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#REPEAT">repeat</a></td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- <td class="blb">0 / 1=1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#RESOURCES">resources</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#RRULE">rrule</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#REQUEST-STATUS">rstatus</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#SEQUENCE">sequence</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#STATUS">status</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#SUMMARY">summary</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">1</td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#TRANSP">transp</a></td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#TRIGGER">trigger</a></td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- <td class="blb">1</td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#UID">uid</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#URL">url</a></td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb">0-1</td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- <td class="blb"> </td>
- </tr>
- <tr>
- <td class="bb"><a class="ref" href="#X-PROPERTY_PROP">x-prop</a></td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- <td class="blb">0-m</td>
- </tr>
- </table>
- <p>
- If not set, the <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties
- are automatically created by iCalcreator<br>
- for <a href="#VEVENT">vevent</a>,<a href="#VTODO">vtodo</a>, <a href="#VJOURNAL">vjournal</a> and <a href="#VFREEBUSY">vfreebusy</a> components<br>
- when using iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or <a href="#returnCalendar">returnCalendar</a><br>
- or when fetching <a href="#DTSTAMP">DTSTAMP</a>/<a href="#UID">UID</a> property value with the component method <a href="#getProperty_PROP">getProperty</a>.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_Component_list">[up]</a>
- <a name="Function_list"></a><h1>3 Function list</h1>
- <a name="iCalcreator_object_methods"></a><h2>3.1 iCalcreator object methods</h2>
- <a name="Calendar_object_constructors"></a><h3>3.1.1 Constructors</h3>
- <a name="vcalendar_constr"></a><h4>3.1.1.1 vcalendar</h4>
- <p>Create a new <a href="#VCALENDAR">VCALENDAR</a> object.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::vcalendar( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Basic example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- </p>
- <p>
- The <strong>calendar</strong> property PRODID and each component property <a href="#UID">UID</a> are AUTOMATICALLY generated in iCalcreator,
- if not set manually, and based on the configuration <a href="#Unique_id">unique_id</a>.
- </p>
- <p class="label">Extended example</p>
- <p class="example">
- $tz = "Europe/Stockholm"
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se"
- kigkonsult\iCalcreator\util\util::$TZID => $tz );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->setProperty( "X-WR-TIMEZONE",
- $tz );
- // <span class="comment">insert components or parse an iCal file (and edit components)</span>
- $xprops = array( "X-LIC-LOCATION" => $tz );
- kigkonsult\iCalcreator\timezoneHandler::createTimezone( $vcalendar,
- $tz,
- $xprops );
- </p>
- <p>
- The <a href="#dTZID">TZID</a> config key and value (timezone) is supplied when setting <a href="#DTSTART">DTSTART</a>,
- <a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>,
- if not set manually, a TZID <b>auto completion</b>.
- </p>
- <p>
- Some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
- and vtimezone component with property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>,
- review <a href="#createTimezone">createTimezone</a>, a method in the timezoneHandler class.
- </p>
- <p>
- Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor,
- due to inability to detect error (bool false) config return.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="vevent_constr"></a><h4>3.1.1.2 vevent</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VEVENT">VEVENT</a> object using an iCalcreator object component factory-method,
- returning a reference to the new component.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVEVENT as used in code snippets is available.
- </p>
- <p class="format">vcalendar::newComponent( "vevent" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $vevent->setProperty( .. .
- </p>
- <p>
- You can also use a convenient vcalendar::newComponent() method wrapper, like:
- </p>
- <p class="format">vcalendar::newVevent()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newVevent();
- $vevent->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VEVENT">VEVENT</a> object.</p>
- <p class="format">vevent::vevent( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $config = $vcalendar->getConfig();
- $vevent = new kigkonsult\iCalcreator\vevent( $config );
- $vevent->setProperty( .. .
- $vcalendar->setComponent( $vevent );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="vtodo_constr"></a><h4>3.1.1.3 vtodo</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VTODO">VTODO</a> object using an iCalcreator object component factory-method,
- returning a reference to the new component.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVTODO as used in code snippets is available.
- </p>
- <p class="format">vcalendar::newComponent( "vtodo" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtodo = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTODO );
- $vtodo->setProperty( .. .
- </p>
- <p>
- You can also use a convenient vcalendar::newComponent() method wrapper, like:
- </p>
- <p class="format">vcalendar::newVtodo()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtodo = $vcalendar->newVtodo();
- $vtodo->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VTODO">VTODO</a> object.</p>
- <p class="format">vtodo::vtodo( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtodo = new kigkonsult\iCalcreator\vtodo( $vcalendar->getConfig());
- $vtodo->setProperty( .. .
- $vcalendar->setComponent( $vtodo );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="vjournal_constr"></a><h4>3.1.1.4 vjournal</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VJOUNAL">VJOURNAL</a> object using an iCalcreator object factory-method,
- returning a reference to the new component.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVJOURNAL as used in code snippets is available.
- </p>
- <p class="format">vcalendar::newComponent( "vjournal" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vjournal = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVJOURNAL );
- $vjournal->setProperty( .. .
- </p>
- <p>
- You can also use a convenient vcalendar::newComponent() method wrapper, like:
- </p>
- <p class="format">vcalendar::newVjournal()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vjournal = $vcalendar->newVjournal();
- $vjournal->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VJOURNAL">VJOURNAL</a> object.</p>
- <p class="format">vjournal::vjournal( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vjournal = new kigkonsult\iCalcreator\vjournal( $vcalendar->getConfig());
- $vjournal->setProperty( .. .
- $vcalendar->setComponent( $vjournal );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="vfreebusy_constr"></a><h4>3.1.1.5 vfreebusy</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object using an iCalcreator object factory-method,
- returning a reference to the new component.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVFREEBUSY as used in code snippets is available.
- </p>
- <p class="format">vcalendar::newComponent( "vfreebusy" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vfreebusy = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVFREEBUSY );
- $vfreebusy->setProperty( .. .
- </p>
- <p>
- You can also use a convenient vcalendar::newComponent() method wrapper, like:
- </p>
- <p class="format">vcalendar::newVfreebusy()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vfreebusy = $vcalendar->newVfreebusy();
- $vfreebusy->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VFREEBUSY">VFREEBUSY</a> object.</p>
- <p class="format">vfreebusy::vfreebusy( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vfreebusy = new kigkonsult\iCalcreator\vfreebusy( $vcalendar->getConfig());
- $vfreebusy->setProperty( .. .
- $vcalendar->setComponent( $vfreebusy );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="valarm_constr"></a><h4>3.1.1.6 valarm</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VALARM">VALARM</a> object using an iCalcreator object component factory-method,
- returning a reference to the new (sub-)component.
- The <a href="#VALARM">VALARM</a> calendar component MUST only appear (one or more, mutually independent)
- within either a <a href="#VEVENT">VEVENT</a> or <a href="#VTODO">VTODO</a> calendar component.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVALARM as used in code snippets is available.
- </p>
- <p class="format">calendarComponent::newComponent( "valarm" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $vevent->setProperty( .. .
- $valarm = $vevent->newComponent( kigkonsult\iCalcreator\util\util::$LCVALARM );
- $valarm->setProperty( .. .
- </p>
- <p>
- You can also use a convenient calendarComponent::newComponent() method wrapper, like:
- </p>
- <p class="format">calendarComponent::newValarm()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newVevent();
- $vevent->setProperty( .. .
- $valarm = $vevent->newValarm();
- $valarm->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VALARM">VALARM</a> object.</p>
- <p class="format">valarm::valarm( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = new kigkonsult\iCalcreator\vevent();
- $vevent->setProperty( .. .
- $valarm = new kigkonsult\iCalcreator\valarm( $vevent->getConfig());
- $valarm->setProperty( .. .
- $vevent->setComponent( $valarm );
- $vcalendar->setComponent( $vevent );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="vtimezone_constr"></a><h4>3.1.1.7 vtimezone</h4>
- <p>
- The vtimezone component describe, at a minimum, the base offset from <b>UTC</b> for the time zone.
- For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LCVTIMEZONE as used in code snippets is available.
- </p>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object using an iCalcreator object component factory-method,
- returning a reference to the new component.
- </p>
- <p class="format">vcalendar::newComponent( "vtimezone" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( .. .
- </p>
- <p>
- You can also use a convenient vcalendar::newComponent() method wrapper, like:
- </p>
- <p class="format">vcalendar::newVtimezone()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newVtimezone();
- $vtimezone->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> object.</p>
- <p class="format">vtimezone::vtimezone( [ config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = new kigkonsult\iCalcreator\vtimezone( $vcalendar->getConfig());
- $vtimezone->setProperty( .. .
- $vcalendar->setComponent( $vtimezone );
- </p>
- <br>
- <h5>Creation of timezone components</h5>
- <p>
- It is possible to create timezone components, using a method in timezoneHandler class, <a href="#createTimezone">createTimezone</a>
- and utilizing the <em>PHP</em> DateTimeZone class.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="standard_daylight_constr"></a><h4>3.1.1.8 standard / daylight</h4>
- <p class="label">Format 1</p>
- <p>
- Create a new <a href="#VTIMEZONE">VTIMEZONE</a> <b>standard</b> / <b>daylight</b> objects
- using an iCalcreator object component factory-method,
- returning a reference to the new (sub-)component.
- </p>
- <p>
- To ease up usage,
- kigkonsult\iCalcreator\util\util::$LCSTANDARD and
- kigkonsult\iCalcreator\util\util::$LCDAYLIGHT
- as used in code snippets are available.
- </p>
- <p class="format">vtimezone::newComponent( "standard" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( .. .
- $standard = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCSTANDARD );
- $standard->setProperty( .. .
- $daylight = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCDAYLIGHT );
- $daylight->setProperty( .. .
- </p>
- <p>
- You can also use convenient vcalendar::newComponent() method wrappers, like:
- </p>
- <p class="format">vtimezone::newStandard()</p>
- <p class="format">vtimezone::newDaylight()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newVtimezone();
- $vtimezone->setProperty( .. .
- $standard = $vtimezone->newStandard();
- $standard->setProperty( .. .
- $daylight = $vtimezone->newDaylight();
- $daylight->setProperty( .. .
- </p>
- <p class="label">Format 2</p>
- <p>Create a new <a href="#VTIMEZONE">VTIMEZONE</a> STANDARD object.</p>
- <p class="format">vtimezone::vtimezone( "standard" [, config ] )</p>
- <p class="comment">
- config = array, review <a href="#iCalcreator_configuration_methods">configuration</a> options.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = new kigkonsult\iCalcreator\vtimezone( $vcalendar->getConfig());
- $vtimezone->setProperty( .. .
- $standard = new kigkonsult\iCalcreator\vtimezone(
- kigkonsult\iCalcreator\util\util::$LCSTANDARD,
- $vtimezone->getConfig());
- $standard->setProperty( .. .
- $vtimezone->setComponent( $standard );
- $daylight = new kigkonsult\iCalcreator\vtimezone(
- kigkonsult\iCalcreator\util\util::$LCDAYLIGHT,
- $vtimezone->getConfig());
- $daylight->setProperty( .. .
- $vtimezone->setComponent( $daylight );
- $vcalendar->setComponent( $vtimezone );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Function_list">[up]</a>
- <a name="iCalcreator_object_property_methods"></a><h3>3.1.2 iCalcreator object property methods</h3>
- <a name="deleteProperty"></a><h4>3.1.2.1 deleteProperty</h4>
- <p>Generic iCalcreator object deleteProperty method, simplifying removal of <strong>calendar</strong> properties.</p>
- <p>Bool false is returned if no property exists or when end-of-properties at consecutive method calls.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::deleteProperty( [ PropName [, order=1 ] )</p>
- <p class="comment">propName = (string) case independent, [RFC5545] component property names,
- unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
- order = (int) if missing 1st/next occurrence,
- used with multiple (property) occurrences
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- if( ! $vcalendar->deleteProperty( kigkonsult\iCalcreator\util\util::$METHOD ))
- echo "METHOD property not found";
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="getProperty"></a><h4>3.1.2.2 getProperty</h4>
- <p class="label">Format 1</p>
- <p>Generic iCalcreator getProperty method, simplifying fetch of <strong>calendar</strong> properties.</p>
- <p>Bool false is returned if no property exists or when end-of-properties at consecutive method calls.</p>
- <p class="format">vcalendar::getProperty( [ PropName [, order=1 [, complete=false ]]] )</p>
- <p class="comment">propName = (string) case independent, [RFC5545] component property names,
- unknown/missing propName will be regarded as <a href="#X-PROPERTY">X-property</a>.
- order = (int) if missing 1st/next occurrence,
- used with multiply (property) occurrences
- complete = (bool) false (default) : output only property value
- true : output = array( "value"=> <value> ,"params" => <parameter array>)
- </p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- $calscale = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$CALSCALE );
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( )) { // <span class="comment">get x-properties</span>
- </p>
- <a name="getProperty2"></a>
- <a name="geoLocation"></a>
- <p class="label">Format 2</p>
- <p>
- Ability to fetch specific <i>component</i> property (unique) value(-s) and number of occurrence(-s).
- The search includes <b>ALL</b> components within the iCalcreator object instance.
- </p>
- <p>
- Outputs an array( *[ (string) unique-property-value => (int) number_of_occurrence ] ) or an empty array if no hits.
- The array is sorted by (asc.) key. If a property contains multiple values (like "CATAGORIES:course1,courseB" or
- "RESOURCES:pc,camera"), they are split into unique values.
- </p>
- <dl>
- <dt>Supported Descriptive Component Properties
- <dd><a href="#CATEGORIES">CATEGORIES</a>
- <dd><a href="#LOCATION">LOCATION</a>
- <dd>GEOLOCATION <sup>*1</sup>
- <dd><a href="#PRIORITY">PRIORITY</a>
- <dd><a href="#RESOURCES">RESOURCES</a>
- <dd><a href="#STATUS">STATUS</a>
- <dd><a href="#SUMMARY">SUMMARY</a>
- <dt>Supported Date and Time Component Property
- <dd><a href="#DTSTART">DTSTART</a> <sup>*2</sup>
- <dt>Supported Relationship Component Properties
- <dd><a href="#ATTENDEE">ATTENDEE</a> <sup>*3</sup>
- <dd><a href="#CONTACT">CONTACT</a>
- <dd><a href="#ORGANIZER">ORGANIZER</a> <sup>*3</sup>
- <dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a> <sup>*4</sup> (alt. "R-UID")
- <dd><a href="#RELATED-TO">RELATED-TO</a>
- <dd><a href="#URL">URL</a>
- <dd><a href="#UID">UID</a>
- </dl>
- <dl>
- <dt><sup>*1</sup>
- <dd>Using the non-standard directive "GEOLOCATION", iCalcreator returns output supporting<br>
- ISO6709 "Standard representation of geographic point location by coordinates",<br>
- by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
- (only if <a href="#GEO">GEO</a> is set).
- <dt><sup>*2</sup>
- <dd>Using <a href="#DTSTART">DTSTART</a> as argument returns dates in format "YYYYMMDD" (please note, dates within a <a href="#RDATE">RDATE</a>/<a href="#RRULE">RRULE</a>
- recurrence set are NOT included, only the origin start date (<a href="#DTSTART">DTSTART</a>)).
- <dt><sup>*3</sup>
- <dd>The <a href="#ATTENDEE">ATTENDEE</a> and <a href="#ORGANIZER">ORGANIZER</a> output values are prefixed
- by "protocol" like "MAILTO:chair@kigkonsult.se".
- <dt><sup>*4</sup>
- <dd>Using "RECURRENCE-ID-UID" returns <a href="#UID">UID</a> values for component(-s) where <a href="#RECURRENCE-ID">RECURRENCE-ID</a> is set.
- </dl>
- <p>
- To ease up usage, property name holders are found in top of the "util" class (src/util.php).
- </p>
- <p>
- To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
- </p>
- <p>
- To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
- </p>
- <p>
- To get component property values, use <a href="#getProperty_PROP">getProperty</a>.
- </p>
- <p class="format">vcalendar::getProperty( PropName )</p>
- <p class="comment">propName = (string) case independent, property name</p>
- <p class="label">Example 1</p>
- <p>Fetch all attendees in the iCalcreator object instance.</p>
- <p class="example">
- $attendees = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE );
- foreach( $attendees as $attendee => $occurrCount ) {
- .. .
- </p>
- <p class="label">Example 2</p>
- <p>Fetch all DTSTARTs in the iCalcreator object instance.</p>
- <p class="example">
- $startDates = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$DTSTART );
- foreach( $startDates as $startDate => $occurrCount ) {
- .. .
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="setProperty"></a><h4>3.1.2.3 setProperty</h4>
- <p>Generic the iCalcreator object setProperty method,simplifying insert of <strong>calendar</strong> properties.</p>
- <p>A successful update returns true.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
- <p class="comment">propName = (string) case independent, strict [RFC5545] <strong>calendar</strong> property names,
- unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY">X-property</a>.
- Proparg = (mixed) property argument
- Last property argument is a (optional) property dependent parameters
- array( *[(string) key => (string) value ] ).
- A non-standard (, experimental) parameter key MUST be prefixed by "X-".
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar(); // <span class="comment">initiate new CALENDAR</span>
- $vcalendar->setConfig( $config );
- $vcalendar->setProperty( kigkonsult\iCalcreator\util\util::$CALSCALE,
- "GREGORIAN" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="CALSCALE"></a><h4>3.1.2.4 CALSCALE</h4>
- <p>
- This property defines the <strong>calendar</strong> scale used for the <strong>calendar</strong> information specified in the <strong>iCalendar</strong> object.
- </p>
- <p>
- The default value is "GREGORIAN", implied when missing.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CALSCALE as used in code snippets is available.
- </p>
- <h5>Create CALSCALE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::createCalscale()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $vcalendar->createCalscale();
- </p>
- <h5>Delete CALSCALE</h5>
- <p>Remove CALSCALE from calendar.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::deleteProperty( "calscale" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vcalendar->deleteProperty( kigkonsult\iCalcreator\util\util::$CALSCALE );
- </p>
- <h5>Get Calscale</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::getProperty( "calscale" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $calscale = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$CALSCALE );
- </p>
- <h5>Set CALSCALE</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::setProperty( "calscale", value )</p>
- <p class="comment">value = (string) calscale value</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
- $vcalendar->setProperty( kigkonsult\iCalcreator\util\util::$CALSCALE,
- "GREGORIAN" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="METHOD"></a><h4>3.1.2.5 METHOD</h4>
- <p>
- This property defines the <strong>iCalendar</strong> object method associated with the <strong>calendar</strong> object.
- </p>
- <p>
- METHOD property (value PUBLISH etc.) may be required when importing iCal files
- into some calendaring software (MS etc.), as well as <a href="#X-PROPERTY">x-properties</a>
- "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE"
- and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$METHOD as used in code snippets is available.
- </p>
- <h5>Create METHOD</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::createMethod()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $vcalendar->createMethod();
- </p>
- <h5>Delete METHOD</h5>
- <p>Remove METHOD from calendar.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::deleteProperty( "METHOD" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vcalendar->deleteProperty( kigkonsult\iCalcreator\util\util::$METHOD );
- </p>
- <h5>Get METHOD</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::getProperty( "method" );</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- $method = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$METHOD );
- </p>
- <h5>Set METHOD</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::setProperty( "method", value )</p>
- <p class="comment">value = (string) method value</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
- $vcalendar->setProperty( kigkonsult\iCalcreator\util\util::$METHOD,
- "PUBLISH" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="VERSION"></a><h4>3.1.2.6 VERSION</h4>
- <p>
- This property specifies the identifier corresponding to the version number of the <strong>iCalendar</strong> specification.
- This property is always placed first in the <strong>calendar</strong> file.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$VERSION as used in code snippets is available.
- </p>
- <h5>Create Version</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::createVersion()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $vcalendar->createVersion();
- </p>
- <h5>Get Version</h5>
- <p>Fetch property value.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::getProperty( "version" )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $version = $vcalendar->getProperty( kigkonsult\iCalcreator\util\util::$VERSION )
- </p>
- <h5>Set Version</h5>
- <p>Insert property value.
- Only version 2.0 valid, version is <b>AUTO</b> generated at <strong>calendar</strong> creation.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::setProperty( "version", version )</p>
- <p class="comment">version = (string) iCal version</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
- $vcalendar->setProperty( kigkonsult\iCalcreator\util\util::$VERSION,
- "2.0" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="X-PROPERTY"></a><h4>3.1.2.7 X-PROPERTY</h4>
- <p>
- A <strong>calendar</strong>, non-standard property with a TEXT value and a name with an "X-" prefix. In a <strong>calendar</strong>,
- an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
- </p>
- <p>
- X-properties "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE" may be required when importing iCal files
- into some calendaring software (MS etc.), as well as <a href="#METHOD">METHOD</a> property (value PUBLISH etc.)
- and the (automatically created) <a href="#DTSTAMP">DTSTAMP</a> and <a href="#UID">UID</a> properties.
- </p>
- <p>The value type is TEXT.</p>
- <h5>Create X-property</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::createXprop()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $vcalendar->createXprop();
- </p>
- <h5>Delete X-PROPERTY</h5>
- <p>Remove X-PROPERTY from <strong>calendar</strong>.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::deleteProperty( "<X-PROPERTY>" )</p>
- <p class="label">Example 1</p>
- <p>Delete the x-property named "X-PROPERTY".</p>
- <p class="example">
- $vcalendar->deleteProperty( "X-PROPERTY" );
- </p>
- <p class="label">Example 2</p>
- <p>Delete all x-properties.</p>
- <p class="example">
- while( $vcalendar->deleteProperty())
- continue;
- </p>
- <h5>Get X-PROPERTY</h5>
- <p>If set, returns property (name and) value, bool otherwise false.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::getProperty()</p>
- <p class="format">vcalendar::getProperty( "<X-PROPERTY>" )</p>
- <p class="comment">output = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</p>
- <p class="format">vcalendar::getProperty( false, propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( propertyName<sup>1</sup>
- , array( "value" => propertyData<sup>2</sup> )
- , "params" => params<sup>3</sup>))
- <p class="comment">propertyName<sup>1</sup>, propertyData<sup>2</sup> and params<sup>3</sup> specs below.</p>
- </p>
- <p class="label">Example 1</p>
- <p>
- Read all x-prop values in a loop. Output in detail below.
- </p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( )) {
- // <span class="comment">$xprop = array( propertyName<sup>1</sup>,
- propertyData<sup>2</sup> )</span>
- .. .
- </p>
- <p class="label">Example 2</p>
- <p>
- If exists, read the X-WR-TIMEZONE x-prop
- </p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- if( $xprop = $vcalendar->getProperty( "X-WR-TIMEZONE" )) {
- // <span class="comment">$xprop = array( "X-WR-TIMEZONE",
- propertyData<sup>2</sup> )</span>
- </p>
- <p class="label">Example 3</p>
- <p>
- Read all x-prop values/parameters in a loop.
- </p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( false, false, true )) {
- /* <span class="comment">$xprop = array( propertyName<sup>1</sup>,
- array( "value" => propertyData<sup>2</sup>,
- "params" => params<sup>3</sup> ))</span>
- */
- .. .
- </p>
- <h5>Set X-PROPERTY</h5>
- Insert property name and value. If an x-prop with the same name already exists, it will be replaced.
- PropertyNames are always stored upperCase, ex. x-wr-calname => X-WR-CALNAME.
- <p class="label">Format</p>
- <p class="format">vcalendar::setProperty( propertyName, propertyData [, params ] )</p>
- <p class="comment">propertyName<sup>1</sup> = (string) Any property name with a "X-" prefix
- propertyData<sup>2</sup> = (string) Value type TEXT
- params<sup>3</sup> = (array) ( ["LANGUAGE" => (string) "lang<sup>*</sup>"] *[, xparams] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config ); // initiate new CALENDAR
- // <span class="comment">set some X-properties</span>
- $vcalendar->setProperty( "x-wr-calname",
- "Calendar Sample" )
- $vcalendar->setProperty( "X-WR-CALDESC",
- "Calendar Description" );
- $vcalendar->setProperty( "X-WR-TIMEZONE",
- "Europe/Stockholm" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_object_property_methods">[up]</a>
- <a name="iCalcreator_component_object_methods"></a><h3>3.1.3 iCalcreator component object methods</h3>
- <a name="deleteComponent"></a><h4>3.1.3.1 deleteComponent</h4>
- <p>
- Remove component from the iCalcreator object instance.
- </p>
- <p>
- Bool false is returned if no component exists or at end-of-components invoking the method consecutive.
- </p>
- <p class="label">format 1</p>
- Remove component with order number (1st=1, 2nd=2).
- <p class="format">vcalendar::deleteComponent( orderNumber )</p>
- <p class="comment">orderNumber = (int) order number</p>
- <p class="label">format 2</p>
- <P>Remove component with component type (e.g. "vevent") and order 1 alt. suborder number.</p>
- <p class="format">vcalendar::deleteComponent( componentType [, componentSuborderNumber])</p>
- <p class="comment">componentType = (string) component type
- componentSuborderNumber = (int) order number</p>
- <p class="label">format 3</p>
- <p>Remove component with <a href="#UID">UID</a>. N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.</p>
- <p class="format">vcalendar::deleteComponent( <a href="#UID">UID</a> )</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $vcalendar->deleteComponent( 1 );
- $vcalendar->deleteComponent( kigkonsult\iCalcreator\util\util::$LCVTODO, 2 );
- $vcalendar->deleteComponent( "20070803T194810CEST-0123U3PXiX@kigkonsult.se");
- </p>
- <p class="label">Example 2</p>
- <p>Deleting all components, using format 2 without order number.</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $vcalendar->deleteComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT))
- continue;
- $vtodo = $vcalendar->getComponent( kigkonsult\iCalcreator\util\util::$LCVTODO );
- while( $vtodo->deleteComponent( kigkonsult\iCalcreator\util\util::$LCVALARM))
- continue;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="getComponent"></a><h4>3.1.3.2 getComponent</h4>
- <p>Get (next) component from the iCalcreator object instance.</p>
- <p>
- Bool false is returned if no component exists or at end-of-components invoking the method consecutive.
- </p>
- <p class="label">format 1</p>
- <p>Get next component, until end-of-components.</p>
- <p class="format">vcalendar::getComponent()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $comp = $vcalendar->getComponent()) {§
- .. .
- }
- </p>
- <p class="label">format 2</p>
- <P>Get specific component with order number (1st=1, 2nd=2).</p>
- <p class="format">vcalendar::getComponent( orderNumber )</p>
- <p class="comment">orderNumber = (int) order number</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- if( $comp = $vcalendar->getComponent( 1 )) {
- .. .
- }
- </p>
- <p class="label">format 3</p>
- <p>
- Get (first/next) component with component type (until end-of-components) alt.
- get specific component with component type and suborder number (1st=1, 2nd=2).
- </p>
- <p class="format">vcalendar::getComponent( componentType [, componentSuborderNumber])</p>
- <p class="comment">componentType = (string) component type
- componentSuborderNumber = (int) order number</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- if( $comp = $vcalendar->getComponent( kigkonsult\iCalcreator\util\util::$LCVTODO, 2 )) {
- .. .
- }
- </p>
- <p class="label">format 4</p>
- <p>
- Get (first/next) component with <a href="#UID">UID</a> as key.
- (<a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.)
- May be used when trying to find (base) component and corresponding <a href="#RECURRENCE-ID">RECURRENCE-ID</a> components.
- </p>
- <p class="format">vcalendar::getComponent( <a href="#UID">UID</a> )</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $uid = "20070803T194810CEST-0123U3PXiX@kigkonsult.se";
- if( $comp = $vcalendar->getComponent( $uid )) {
- .. .
- }
- </p>
- <a name="getComponent5"></a>
- <p class="label">format 5</p>
- <p>
- Get (first/next) component based on specific property contents:
- </p>
- <p>
- To ease up usage, property name holders are found in top of the "util" class (src/util.php).
- </p>
- <dl>
- <dt>Supported Descriptive Component Properties
- <dd><a href="#CATEGORIES">CATEGORIES</a>
- <dd><a href="#LOCATION">LOCATION</a>
- <dd><a href="#PRIORITY">PRIORITY</a>
- <dd><a href="#RESOURCES">RESOURCES</a>
- <dd><a href="#STATUS">STATUS</a>
- <dd><a href="#SUMMARY">SUMMARY</a>
- <dt>Date and Time Component Properties
- <dd><a href="#COMPLETED">COMPLETED</a>
- <dd><a href="#DTEND">DTEND</a>
- <dd><a href="#DUE">DUE</a>
- <dd><a href="#DTSTART">DTSTART</a>
- <dt>SupportedRelationship Component Properties
- <dd><a href="#ATTENDEE">ATTENDEE</a> <sup>*1</sup>
- <dd><a href="#CONTACT">CONTACT</a>
- <dd><a href="#ORGANIZER">ORGANIZER</a> <sup>*1</sup>
- <dd><a href="#RECURRENCE-ID">RECURRENCE-ID</a>
- <dd><a href="#RELATED-TO">RELATED-TO</a>
- <dd><a href="#URL">URL</a>
- <dd><a href="#UID">UID</a>
- <dt>Change Management Component Properties
- <dd><a href="#CREATED">CREATED</a>
- <dd><a href="#DTSTAMP">DTSTAMP</a>
- <dd><a href="#LAST-MODIFIED">LAST-MODIFIED</a>
- </dl>
- <dl>
- <dt><sup>*1</sup>
- <dd><a href="#ATTENDEE">ATTENDEE</a> and
- <a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by protocol ex. "MAILTO:chair@ical.net".
- </dl>
- <p>
- For the property "SUMMARY" ,if a search value (any case) exists within property value, a hit exists.
- For the other, non-date, properties an exact (strict case) match is required.
- </p>
- <p>
- To select components based on property values, use <a href="#selectComponents2">selectComponents</a> (Format 2).
- </p>
- <p>
- To retrieve specific iCalcreator object instance property values, searching <b>ALL</b> components,
- use <a href="#getProperty2">getProperty</a> (Format 2).
- </p>
- <p class="format">vcalendar::getComponent( search )</p>
- <p class="comment">
- search = (array) ( *[ propertyName => uniqueValue ]), multiple array elements are combined by "OR"
- propertyName = (string) property name, above
- propertyData = (string) unique property value (strict case),
- date format "YYYYMMDD" (if any side is DATE, only dates are used),
- datetime format "YYYYMMDDTHHMMSS"</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $comp = $vcalendar->getComponent( array( kigkonsult\iCalcreator\util\util::$RESOURCES =>
- "PC" )) {
- }
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="newComponent"></a><h4>3.1.3.3 newComponent</h4>
- <P>
- Create component (<a href="#VEVENT">VEVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a> / <a href="#VTIMEZONE">VTIMEZONE</a>)
- using a iCalcreator object factory-method, returning a reference to the new component.
- </p>
- <p>
- To ease up usage,
- kigkonsult\iCalcreator\util\util::$LCVEVENT,
- kigkonsult\iCalcreator\util\util::$LCVTODO,,
- kigkonsult\iCalcreator\util\util::$LCVJOURNAL,
- kigkonsult\iCalcreator\util\util::$LCVFREEBUSY and
- kigkonsult\iCalcreator\util\util::$LCVTIMEZONE
- as used in code snippets is available.
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::newComponent( componentType )</p>
- <p class="comment">componentType = (string) component type</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="replaceComponent"></a><h4>3.1.3.4 replaceComponent</h4>
- <P>
- Replace calendar component in vcalendar based on component property <a href="#UID">UID</a>
- (<a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> / <a href="#VFREEBUSY">VFREEBUSY</a>).
- If not found, inserted last in component chain.
- </p>
- <p>
- In case of multiple components sharing the same UID (ex. a RECURRENCE-ID property altering a recurrence pattern), the first found is replaced
- and it may lead to unpredictable result, to use with care.
- </p>
- <p>
- For a <a href="#VTIMEZONE">VTIMEZONE</a> component, a <a href="#TZID">TZID</a> match is required.
- </p>
- <p>
- A successfull replace returns bool true otherwise bool false.
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::replaceComponent( component )</p>
- <p class="comment">component = (object) component object instance</p>
- <p class="label">Example</p>
- <p class="example">
- $vcalendar->replaceComponent( $component );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="selectComponents"></a><h4>3.1.3.5 selectComponents</h4>
- <p class="label">Format 1</p>
- <p>
- Selects <a href="#VEVENT">EVENT</a> / <a href="#VTODO">VTODO</a> / <a href="#VJOURNAL">VJOURNAL</a> /
- <a href="#VFREEBUSY">VFREEBUSY</a> components from the iCalcreator object instance on based on <b>dates</b>
- (notice <a href="#date_restriction">date restriction</a>), based on the initial <a href="#DTSTART">DTSTART</a>
- property along with the <a href="#RRULE">RRULE</a>, <a href="#RDATE">RDATE</a>, <a href="#EXDATE">EXDATE</a>
- and <a href="#EXRULE">EXRULE</a> properties in the component.
- </p>
- <p>Requirement:</p>
- <ul>
- <li>The property <a href="#DTSTART">DTSTART</a> is required. If missing in a <a href="#VTODO">VTODO</a> component, <a href="#DTSTART">DUE</a> is used.</li>
- <li>If not using local date, timezone in property <a href="#DTSTART">DTSTART</a> etc. MUST be PHP complient.</li>
- </ul>
- <p>Limitations:</p>
- <ul>
- <li>The values "SECONDLY" / "MINUTELY" / "HOURLY" in the "FREQ" rule part are NOT supported.
- <li>If using components with properties<br>
- <a href="#UID">UID</a> in combination with <a href="#SEQUENCE">SEQUENCE</a> and <a href="#RECURRENCE-ID">RECURRENCE-ID</a><br>
- (i.e. altering an individual instance within the recurrence set),<br>
- the <a href="#RECURRENCE-ID">RECURRENCE-ID</a> parameter "RANGE" ("THISANDPRIOR" / "THISANDFUTURE") is NOT (yet) supported.</li>
- <li>only one reccurrence a day</li>
- <li>a RDATE reccurrence will overwrite any RRULE reccurrence, on an date (Ymd) basis</li>
- <li>no X-CURRENT-DTEND if no DTEND (DUE) is set (below)</li>
- </ul>
- <p>
- Returns an array with components (events) or bool false is returned if no selected component exists.
- <p>
- <p>Added X-properties in recurrent instances of a <strong>calendar</strong> component:</p>
- <ul>
- <li>"X-CURRENT-DTSTART", TEXT content, <i>"Y-m-d [H:i:s [timezone]]"</i> showing the current start date.</li>
- <li>"X-CURRENT-DTEND" alt. "X-CURRENT-DUE" (opt), TEXT content, <i>"Y-m-d [H:i:s [timezone]]"</i> showing the current end date.</li>
- <li>"X-RECURRENCE", the RRULE/RDATE recurrence pattarn number (none in the recurrence start), also after an RECURRENCE-ID change</li>
- <li>"X-OCCURENCE", contains, where applicable, single multi-day recurrence event day number (formatted as 'day X of Y')</li>
- </ul>
- <p>
- To ease up usage,
- kigkonsult\iCalcreator\util\util::$X_CURRENT_DTSTART,
- kigkonsult\iCalcreator\util\util::$X_CURRENT_DTEND,
- kigkonsult\iCalcreator\util\util::$X_CURRENT_DUE,
- kigkonsult\iCalcreator\util\util::$X_RECURRENCE,
- kigkonsult\iCalcreator\util\util::$X_OCCURENCE and
- are available.
- </p>
- <p class="format">vcalendar::selectComponents([ startYear, startMonth, startDay
- [, endYear, endMonth, endDay
- [, cType [, flat [, any [, split]]]]]])
- </p>
- <p class="comment">startYear : (int) start year (4*digit), default current year
- (object) start date (datetime)<sup>*</sup>
- startMonth : (int) start month (1-2*digit), default current month
- (object) end date (datetime)<sup>*</sup>
- startDay : (int) start day (1-2*digit), default current day
- endYear : (int) end year (4*digit), default startYear
- endMonth : (int) end month (1-2*digit), default startMonth
- endDay : (int) end day (1-2*digit), default startDay
- cType : (mixed) <strong>calendar</strong> component type(-s), (string/array)
- ("vevent", "vtodo", "vjournal", "vfreebusy")
- (bool) false (default) => all
- flat : (bool) true => output : array[] (ignores split)
- component where recurrence pattern exists within period
- false (default) => output : array[Year][Month][Day][]
- any : (bool) true (default) => select components with recurrence within period
- false => only components that starts (DTSTART) within period
- split : (bool) true (default) => one component copy for every day it occurs
- within the period
- false => one occurrence of component in output array,
- start date/recurrence (start) date
- <sup>*</sup>When using datetime objects, other start/end arguments are ignored.
- valid flat any split
- combinations (defaults in upper case)
- 1 false true true
- 2 false true false
- 3 false false [false] (split set to false if flat=false and any=false)
- 4 true true [false] (split set to false if flat=true)
- 5 true false [false] (split set to false if flat=true)
- If flat is set to false, output array is sorted in 'Y-m-d h-i-s' asc. order.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $events_arr = $vcalendar->selectComponents( 2007, 11, 1, 2007, 11, 30,
- kigkonsult\iCalcreator\util\util::$LCVEVENT );
- // <span class="comment">select all events occurring 1-30 nov. 2007</span>
- foreach( $events_arr as $year => $year_arr ) {
- foreach( $year_arr as $month => $month_arr ) {
- foreach( $month_arr as $day => $day_arr ) {
- foreach( $day_arr as $event ) {
- $currddate = $event->getProperty( kigkonsult\iCalcreator\util\util::$X_CURRENT_DTSTART );
- <span class="comment">// if member of a recurrence set, returns
- // array(" x-current-dtstart",
- // <(string) date("Y-m-d [H:i:s][timezone/UTC offset]")>)</span>
- $startDate = $event->getProperty( kigkonsult\iCalcreator\util\util::$DTSTART );
- $summary = $event->getProperty( kigkonsult\iCalcreator\util\util::$SUMMARY );
- $description = $event->getProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION );
- </p>
- <a name="selectComponents2"></a>
- <p class="label">format 2</p>
- <p>
- Using this format, the iCalcreator object method selects components based on specific property value(-s).
- </p>
- <dl>
- <dt>Supported Descriptive Component Properties
- <dd><a href="#CATEGORIES">CATEGORIES</a>
- <dd><a href="#LOCATION">LOCATION</a>
- <dd><a href="#PRIORITY">PRIORITY</a>
- <dd><a href="#RESOURCES">RESOURCES</a>
- <dd><a href="#STATUS">STATUS</a>
- <dd><a href="#SUMMARY">SUMMARY</a>
- <dt>Supported Relationship Component Properties
- <dd><a href="#ATTENDEE">ATTENDEE</a> <sup>*1</sup>
- <dd><a href="#CONTACT">CONTACT</a>
- <dd><a href="#ORGANIZER">ORGANIZER</a> <sup>*1</sup>
- <dd><a href="#RELATED-TO">RELATED-TO</a>
- <dd><a href="#URL">URL</a>
- <dd><a href="#UID">UID</a>
- </dl>
- <dl>
- <dt><sup>*1</sup>
- <dd><a href="#ATTENDEE">ATTENDEE</a> and
- <a href="#ORGANIZER">ORGANIZER</a> search values must be prefixed by (upper case) protocol like "MAILTO:chair@ical.net".
- </dl>
- <p>
- To ease up usage, property name holders are found in top of the "util" class (src/util.php).
- </p>
- <p>
- For the property <a href="#SUMMARY">SUMMARY</a>, if a search value (any case) exists within property value, a hit is found.
- For the other properties an exact (strict case) match is required. Multiple search properties may coexist.
- </p>
- <p>
- To retrieve specific iCalcreator object instance property values, searching <b>ALL</b> components,
- use <a href="#getProperty2">getProperty</a> (Format 2).
- </p>
- <p>
- To get components based on property values, use <a href="#getComponent5">getComponent</a> (Format 5).
- </p>
- <p class="format">vcalendar::selectComponents( searchArray )</p>
- <p>Outputs an array of matched (unique) components in <a href="#UID">UID</a> order.</p>
- <p class="comment">searchArray : (array) *( propertyName => propertyValue )
- propertyName : (string) above (any case)
- propertyValue : (string) value / (array) ( *[ (string) value] )
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $searchArray = array( kigkonsult\iCalcreator\util\util::$PRIORITY => array( 1, 2, 3, 4 ));
- $highPrioArr = $vcalendar->selectComponents( $searchArray );
- // <span class="comment">select all components with PRIORITY set to high (1-4)</span>
- if( ! empty( $highPrioArr )) {
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $highPrioCal = new kigkonsult\iCalcreator\vcalendar( $config );
- $highPrioCal->setProperty( "X-WR-CALDESC",
- "High priority events" );
- foreach( $highPrioArr as $highPrioComponent )
- $highPrioCal->setComponent( $highPrioComponent );
- $highPrioCal->returnCalendar();
- }
- exit;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="setComponent"></a><h4>3.1.3.6 setComponent</h4>
- <p>
- Replace or update component in the iCalcreator object instance.
- Also add a <strong>calendar</strong> component to the iCalcreator object instance
- when <strong>calendar</strong> component is created with the procedural (<b>non</b>-factory) method,
- see example <a href="#vevent_constr">VEVENT</a>, format 2.
- </p>
- <p>A successful update returns true.</p>
- <p class="label">format 1</p>
- <p>Insert last in component chain.</p>
- <p class="format">vcalendar::setComponent( component )
- addComponent( component ) // <span class="comment">alias</span></p>
- <p class="comment">component = (object) iCalcreator component instance</p>
- <p class="comment">addComponent, may be removed in future versions.</p>
- <p class="label">format 2</p>
- <p>
- Insert/replace component with order number (1st=1, 2nd=2).
- If replace and orderNumber is not found, component is inserted last in chain.
- </p>
- <p class="format">vcalendar::setComponent( component, orderNumber )</p>
- <p class="comment">component = (object) iCalcreator component instance
- int = (int) order numder</p>
- <p class="label">format 3</p>
- <p>
- Replace component with component type and 1st alt. component order number.
- If orderNumber is not found, component is inserted last in chain.
- </p>
- <p class="format">vcalendar::setComponent( component, componentType [, componentSuborderNo])</p>
- <p class="comment">component = (object) iCalcreator component instance
- componentType = (string) component type
- componentSuborderNo = (int) component Suborder Number</p>
- <p class="label">format 4</p>
- <p>
- Replace component with <a href="#UID">UID</a>.
- N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a> components.
- If <a href="#UID">UID</a> is not found, component is inserted last in chain.
- </p>
- <p class="format">vcalendar::setComponent( component, <a href="#UID">UID</a> )</p>
- <p class="comment">component = (object) iCalcreator component instance</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics");
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $vevent = vcalendar->getComponent( 1 ); // <span class="comment">fetch first EVENT</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- 2006, 12, 24, 19, 30, 00 );
- // <span class="comment">update <a class="ref" href="#DTSTART">DTSTART</a> property</span>
- $vcalendar->setComponent( $vevent, 1 ); // <span class="comment">replace first component</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_object_methods">[up]</a>
- <a name="iCalcreator_calendar_methods"></a><h3>3.1.4 iCalcreator calendar methods</h3>
- <a name="parse_merge"></a><h4>3.1.4.1 parse and merge</h4>
- <p>
- Parse iCal file(-s) or string/array <strong>calendar</strong> content into a single iCalcreator object instance (components, properties and parameters),
- including multiple vcalendars (within a single ICS file) parse, e.g. Oracle Calendar exports.
- </p>
- <p>
- As long as php.ini directive "allow_url_fopen" is enabled, remote files, URLs; protocol "http" ("webcal"), are supported.
- A remote file, URL, <b>must</b> be prefixed by "http://" ("webcal://") and suffixed by a valid filename.!
- Recommendation is to download (cache) remote file before parsing, due to execution time and control.
- </p>
- <p>
- If missing, component property <a href="#UID">UID</a> is created when parsing.
- For that reason <a href="#Unique_id">UNIQUE_ID</a> might need to be set before parsing, Se examples below.
- </p>
- <p>
- Notice <a href="#date_restriction">date restriction</a>!
- </p>
- <p>
- If major parse error occurs (like file access error,
- invalid <strong>calendar</strong> file or <strong>calendar</strong> file without components), bool is returned.
- </p>
- <p>
- Minor errors like non-standard line-endings, initial and trailing empty lines
- as well as files without proper end line(-s) (i.e. missing component end and/or "END:CALENDAR" iCal directives)
- are managed.
- </p>
- <p>
- Non-standard iCal properties (except the <a href="#X-PROPERTY_PROP">X-properties</a>) are ignored.
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::parse( [ textToParse ] )</p>
- <p class="comment">textToParse = (string) calendarContent
- ex. result from - file_get_contents( "filename")
- (array) calendarContent
- ex. result from - file( "filename", FILE_IGNORE_NEW_LINES )</p>
- <p class="label">parse example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- </p>
- <p class="label">parse example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$URL => "http://www.ical.net/calendars/calendar.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- </p>
- <p class="label">parse example 3</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$URL => "http://www.ical.net/calendars/calendar.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $str = array(
- "BEGIN:VCALENDAR",
- "PRODID:-//kigkonsult.se//NONSGML kigkonsult.se iCalcreator 2.24//",
- "VERSION:2.0",
- "BEGIN:VEVENT",
- "DTSTART:20101224T190000Z",
- "DTEND:20101224T200000Z",
- "DTSTAMP:20101020T103827Z",
- "UID:20101020T113827-1234GkdhFR@test.org",
- "DESCRIPTION:example",
- "END:VEVENT",
- "END:VCALENDAR");
- $vcalendar->parse( $str );
- </p>
- <p class="label">merge example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$FILENAME, "file1.ics" );
- $vcalendar->parse();
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$FILENAME, "file2.ics" );
- $vcalendar->parse();
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$DIRECTORY, "export" );
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$FILENAME, "icalmerge.ics" );
- $vcalendar->saveCalendar();
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="createCalendar"></a><h4>3.1.4.2 createCalendar</h4>
- Generate and return <strong>calendar</strong> in a string, testing?
- <p class="label">Format</p>
- <p class="format">vcalendar::createCalendar()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $vcalendar->createCalendar();
- echo $str;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="returnCalendar"></a><h4>3.1.4.3 returnCalendar</h4>
- <p>
- Redirect the iCalcreator object instance content to user browser.
- Filename, addressed to browser, is automatically generated if missing or not set
- and the filename will look like it is set using<br>
- </p>
- <p class="example">$filename = date( "YmdHis" ).".ics"</p>
- <p>
- The method do not stop PHP script (exit), returns (bool) true on success!
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::returnCalendar( [ utf8Encode [, gzip [, cdType ]]] )</p>
- <p class="comment">utf8Encode = (bool) true: utf8 encoded output,
- false: (default) no encoding
- gzip = (bool) true: gzip compressed output
- Header "Content-Length" only sent when gzip=true
- false: (default) no compressing
- cdType = (bool) true: (default) Content-Disposition: attachment
- false: Content-Disposition: inline</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- array( "year" => 2007,
- "month" => 4,
- "day" => 1,
- "hour" => 19 ));
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DURATION,
- 0, 0, 3 ));
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$LOCATION,
- "Central Plaza" );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$SUMMARY,
- "PHP summit" );
- $vcalendar->returnCalendar();
- exit;
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->setConfig( array( kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" ));
- $vcalendar->parse();
- $utf8Encode = true;
- if( isset( $_SERVER["HTTP_ACCEPT_ENCODING"] ) &&
- ( false !== strpos( strtolower( $_SERVER["HTTP_ACCEPT_ENCODING"] ), "gzip" )))
- $gzip = true;
- else
- $gzip = false;
- $vcalendar->returnCalendar( $utf8Encode, $gzip );
- exit;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="saveCalendar"></a><h4>3.1.4.4 saveCalendar</h4>
- <p>
- Save the iCalcreator object instance in a file,
- using preset <a href="#Directory">directory</a> and <a href="#Filename">filename</a>.
- Filename is automatically generated if missing or not set
- and the filename will look like it is set using<br>
- </p>
- <p class="example">$filename = date( "YmdHis" ).".ics"</p>
- </p>
- <p>Return bool true on success, on error false.</p>
- <p class="label">Format</p>
- <p class="format">vcalendar::saveCalendar()</p>
- <p class="label">Example</p>
- <p class="example">
- $vcalendar->setConfig( array( kigkonsult\iCalcreator\util\util::$DIRECTORY => "depot",
- kigkonsult\iCalcreator\util\util::$FILENAME => "calendar.ics" ));
- if( false === $vcalendar->saveCalendar()) {
- echo "error when saving"
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="sort"></a><h4>3.1.4.5 sort</h4>
- <p class="label">Format 1</p>
- <p>
- Sort created/parsed <strong>calendar</strong> components on the following (prioritized) keys:<br>
- 1 - X-CURRENT-DTSTART - X-CURRENT-DTEND/X-CURRENT-DUE<br>
- (if created in iCalcreator object method <a href="#selectComponents">selectComponents</a>)<br>
- 1 - <a href="#DTSTART">DTSTART</a> - <a href="#DTEND">DTEND</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VEVENT">VEVENT</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components)<br>
- 1 - <a href="#DTSTART">DTSTART</a> - <a href="#DUE">DUE</a> alt. <a href="#DURATION">DURATION</a> (<a href="#VTODO">VTODO</a> components)<br>
- 1 - <a href="#DTSTART">DTSTART</a> (<a href="#VJOURNAL">VJOURNAL</a> components)<br>
- 2 - <a href="#CREATED">CREATED</a> / <a href="#DTSTAMP">DTSTAMP</a><br>
- 3 - <a href="#UID">UID</a><br>
- A date value, like "DTSTART;VALUE=DATE:20120717", are sorted before a datetime value.<br>
- <a href="#VTIMEZONE">VTIMEZONE</a> component(-s) is always placed first (ordered by <a href="#TZID">TZID</a>). The
- <a href="#VTIMEZONE">STANDARD</a> / <a href="#VTIMEZONE">DAYLIGHT</a> sub-components are sorted (on asc. key <a href="#DTSTART">DTSTART</a>) when calling
- <a href="#createCalendar">createCalendar</a> (or <a href="#returnCalender">returnCalender</a>).
- <br>
- <a href="#VALARM">ALARM</a> sub-components, if exists, are not sorted.
- </p>
- <p class="format">vcalendar::sort()</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->setConfig( array( kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" ));
- $vcalendar->parse();
- $vcalendar->sort();
- $vcalendar->returnCalendar();
- exit;
- </p>
- <a name="sort2"></a>
- <p class="label">Format 2</p>
- <p>
- Sort created/parsed <strong>calendar</strong> components based on specific property values and ascending order.
- If a property is not set in component, an empty sort key is used (i.e. sorted first).
- </p>
- <p class="format">vcalendar::sort( sortArgument )</p>
- <p class="comment">sortArgument: (string) "<a href="#ATTENDEE">ATTENDEE</a>" <sup>*</sup> / "<a href="#CATEGORIES">CATEGORIES</a>" <sup>*</sup> / "<a href="#CONTACT">CONTACT</a>" <sup>*</sup> / "<a href="#DTSTAMP">DTSTAMP</a>" /
- "<a href="#LOCATION">LOCATION"</a>" / "<a href="#ORGANIZER">ORGANIZER</a>" / "<a href="#PRIORITY">PRIORITY</a>" /
- "<a href="#RESOURCES">RESOURCES</a>" <sup>*</sup> / "<a href="#STATUS">STATUS</a>" / "<a href="#SUMMARY">SUMMARY</a>" / "<a href="#URL">URL</a>" / "<a href="#UID">UID</a>" <sup>**</sup>.
- <p class="comment"><sup>*) </sup> For a property where multiple occurrence may exist (<a href="#ATTENDEE">ATTENDEE</a>, <a href="#CATEGORIES">CATEGORIES</a>, <a href="#CONTACT">CONTACT</a>, <a href="#RESOURCES">RESOURCES</a>) lowest (alphabetic) value is used as sort key.</p>
- <p class="comment"><sup>**)</sup> For multiple components with the same <a href="#UID">UID</a>, components with <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / <a href="#SEQUENCE">SEQUENCE</a> set are sorted first (on asc. values) and components without <a href="#RECURRENCE-ID">RECURRENCE-ID</a> last.</p>
- <p>
- To ease up usage, property name holders are found in top of the "util" class (src/util.php).
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="useCachedCalendar"></a><h4>3.1.4.6 useCachedCalendar</h4>
- <p>
- If a recent version of (non-empty and saved) <strong>calendar</strong> file exists, an HTTP redirect is sent otherwise bool false is returned.
- </p>
- <p>
- NOTE, the method no longer stops PHP script (exit), returns bool true on success, false on error!
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::useCachedCalendar( [ timeout [, cdType ]] )</p>
- <p class="comment">timeout = (int) default 3600 sec
- cdType = (bool) true: (default) Content-Disposition: attachment
- false: Content-Disposition: inline</p>
- <p class="label">Example</p>
- <p class="example">
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$DIRECTORY, "depot" );
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$FILENAME, "calendar.ics" );
- $vcalendar->useCachedCalendar();
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="iCalcreatorVersion"></a><h4>3.1.4.7 iCalcreatorVersion</h4>
- <p>
- This static class method returns the iCalcreator class version number (2.24+).
- </p>
- <p>
- There is also a <em>PHP</em> constant "ICALCREATOR_VERSION" (all versions).
- </p>
- <p class="label">Format</p>
- <p class="format">vcalendar::iCalcreatorVersion()</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_calendar_methods">[up]</a>
- <a name="iCalcreator_configuration_methods"></a><h3>3.1.5 iCalcreator configuration methods</h3>
- <a name="configKeys"></a><h4>3.1.5.1 configuration keys</h4>
- <p>
- You will find convenient holders for config keys in top of the "util" class file (src/util.php)
- as well as some (most) property parameter keys.
- </p>
- <table>
- <tr>
- <td class="bl bb">key</td>
- <td class="bl bb"><strong>calendar</strong></td>
- <td class="bl bb">component</td>
- <td class="bl bb">remark</td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#allowEmpty">allowEmpty</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Compsinfo">Compsinfo</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref">getConfig only</td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Delimiter">Delimiter</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Directory">Directory</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Filename">Filename</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Dirfile">Dirfile</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref">getConfig only</td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Filesize">Filesize</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref">getConfig only</td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Language">Language</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#setPropertyNames">setPropertyNames</a></td>
- <td class="bl bb center"> </td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref">getConfig only</td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#dTZID">TZID</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#Unique_id">Unique_id</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb center">*</td>
- <td class="bl bb ref"> </td>
- </tr>
- <tr>
- <td class="bl bb"><a class="ref" href="#configURL">URL</a></td>
- <td class="bl bb center">*</td>
- <td class="bl bb"> </td>
- <td class="bl bb ref"> </td>
- </tr>
- </table>
- <br>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="getConfig"></a><h4>3.1.5.2 getConfig</h4>
- <p class="format">vcalendar::getConfig( [ key ] )</p>
- <p class="comment">key = (string) config key</p>
- <p class="label">Example 1</p>
- <p class="example">
- $filename = $vcalendar->getConfig( kigkonsult\iCalcreator\util\util::$FILENAME );
- </p>
- In this example, notice <a href="#Filename">Filename</a>
- <br>
- <p class="label">Example 2</p>
- <p class="example">
- $config = $vcalendar->getConfig();
- </p>
- <p class="comment">Output= array( string key => mixed value
- *[, string key => mixed value] )</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="initConfig"></a><h4>3.1.5.3 calendar/component initialization</h4>
- <p class="label">Format</p>
- <p>Create a new iCalcreator object instance.</p>
- <p class="format">vcalendar::vcalendar( [ config ] )</p>
- <p class="comment">config = (array) ( *[, key => value] )
- key = (string) config key
- value = (mixed) config value</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- </p>
- <p>
- Do <b>NOT</b> set <a href="#Directory">directory</a>/<a href="#Filename">filename</a> in vcalendar constructor,
- due to inability to detect error (bool false) config return.
- </p>
- <p>Create a new <strong>calendar</strong> component.</p>
- <p class="format">vcalendar::component( [ config ] )</p>
- <p class="comment">config = (array) ( key => value *[, key => value] )
- key = (string) config key
- value = (mixed) config value</p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vevent = new kigkonsult\iCalcreator\vevent( $config );
- </p>
- <p class="label">Example 3</p>
- <p class="example">
- $config = $vcalendar->getConfig();
- $vevent = new kigkonsult\iCalcreator\vevent( $config );
- </p>
- <p>Only component relevant configuration are set. If using the <a href="#newComponent">newComponent</a> method, configuration is set automatically.</p>
- <br>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="setConfig"></a><h4>3.1.5.4 setConfig</h4>
- <p>A successful "setConfig" returns true.</p>
- <p class="label">Format 1</p>
- <p class="format">vcalendar::setConfig( [ config ] )</p>
- <p class="comment">config = (array) ( key => value *[, key => value] )
- key = (string) config key
- value = (mixed) config value</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vevent = new kigkonsult\iCalcreator\vevent();
- $vevent->setConfig( $config );
- </p>
- <p class="label">Format 2</p>
- <p class="format">vcalendar::setConfig( key, value )</p>
- <p class="comment">key = (string) config key
- value = (mixed) config value</p>
- <p class="label">Example 1</p>
- <p class="example">
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$DIRECTORY, "depot" );
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $vevent = new kigkonsult\iCalcreator\vevent();
- $vevent->setConfig( kigkonsult\iCalcreator\util\util::$UNIQUE_ID, "kigkonsult.se" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="allowEmpty"></a><h4>3.1.5.5 Allow empty components</h4>
- <p>
- Allow or reject empty <strong>calendar</strong> properties. Used in <a href="#createCalendar">createCalendar</a>, <a href="#returnCalender">returnCalender</a> or
- create<Property> methods, creating [RFC5545] formats.
- </p>
- <p>
- Default true (allow).
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Compsinfo"></a><h4>3.1.5.6 Component information</h4>
- <p>Only to use with iCalcreator object method getConfig.</p>
- <p>
- Get information about the iCalcreator object instance components. Returns array with basic information
- about all components (in array format) within the iCalcreator object instance.
- </p>
- <p class="comment">Output = array ( *compinfo )
- compinfo = array ( "ordno" => int ordno,
- // <span class="commsnt">order number (1st=1, 2nd=2..)</span>
- , "type" => string type
- // <span class="comment">component type (vevent, vtodo</span>
- , "uid" => string uid
- // <span class="comment">component <a href="#UID">UID</a> (not for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">TIMEZONE</a>)</span>
- , "props" =>
- array( *[ propertyName => Property count ])
- // <span class="comment">for every set property</span>
- , "sub" => array( *compinfo ))
- // <span class="comment">if subcomponents exists, an array for each subcomponent</span></p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $compsinfo = $vcalendar->getConfig( kigkonsult\iCalcreator\util\util::$COMPSINFO );
- foreach( $compsinfo as compinfo) {
- echo " order number : ".$compinfo["ordno"]."<br />";
- echo " type : ".$compinfo["type"]."<br />";
- echo " UID : ".$compinfo["uid"]."<br />";
- foreach( $compinfo["props"] as $propertyName => $propertyCount )
- echo " $propertyName = $propertyCount";
- if( is_array( $compinfo["sub"] )) {
- foreach( $compinfo["sub"] as $subcompinfo ) {
- echo " order number : ".$subcompinfo["ordno"]."<br />";
- /* .. dito if subcomponents exists */
- }
- }
- }
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Delimiter"></a><h4>3.1.5.7 Delimiter</h4>
- <p>Directory/filename delimiter.</p>
- <p>
- Default <em>PHP</em> constant DIRECTORY_SEPARATOR. If used, <b>must</b> be set BEFORE filename!
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Directory"></a><h4>3.1.5.8 Directory</h4>
- <p>
- Local directory to store/read iCal files.
- </p>
- <p>
- Default "<b>.</b>".
- </p>
- <p>
- Directory <b>must</b> be set BEFORE <a href="#Filename">filename</a> and <b>must</b> exist and be writeable otherwise bool false is returned.
- If set using an config array and together with <a name="Filename"><u>Filename</u></a>, Directory are set automatically first.
- When setting directory, the <em>PHP</em> realpath function is applied to speed up parse/saveCalendar methods.
- When setting Directory, any previously set <a href="#configURL">URL</a> is removed.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $dir = 'test';
- $config = array( kigkonsult\iCalcreator\util\util::$DIRECTORY => $dir );
- if( false === $vcalendar->setConfig( $config ))
- die( "Invalid directory $dir" );
- </p>
- <p>
- For temporary calendar files, you may set directory/<a href="#Filename">filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
- </p>
- <p>
- Do <b>NOT</b> set directory/<a href="#Filename">filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor,
- due to inability to detect error (bool false) config return.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Dirfile"></a><h4>3.1.5.9 Dirfile</h4>
- <p>
- Only available in iCalcreator object method getConfig, returning (string) <a href="#Directory">directory</a>, <a href="#Delimiter">delimiter</a> and <a href="#Filename">filename</a>.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Fileinfo"></a><h4>3.1.5.10 Fileinfo</h4>
- <p>
- Only available in iCalcreator object method getConfig, giving information in array format about <a href="#Directory">directory</a>,
- <a href="#Filename">filename</a> and <a href="#Filesize">filesize</a>.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $fileinfo = $vcalendar->getConfig( kigkonsult\iCalcreator\util\util::$FILEINFO );
- </p>
- <p class="comment">output = array( <directory>, <filename>, <filesize> )</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Filename"></a><h4>3.1.5.11 Filename</h4>
- <p>Calendar local file name, default created like (if not set) like</p>
- <p class="example">$filename = date( "YmdHis" ).".ics";</p>
- <p>
- If not set, filename is created when requested, ex. in iCalcreator object methods <a href="#saveCalendar">saveCalendar</a> or getConfig(kigkonsult\iCalcreator\util\util::$FILENAME).
- </p>
- <p>
- Local filename <b>must</b> be set AFTER setting directory (and opt. delimiter)!
- Filename (and opt. directory) <b>must</b> be readable/writeable otherwise bool false is returned.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $dir = 'test';
- $config = array( kigkonsult\iCalcreator\util\util::$DIRECTORY => $dir );
- if( false === $vcalendar->setConfig( $config ))
- die( "Error when config directory $dir" );
- $file = 'temp.ics';
- $config = array( kigkonsult\iCalcreator\util\util::$FILENAME => $file );
- if( false === $vcalendar->setConfig( $config ))
- die( "Error when config filename $file" );
- </p>
- <p>
- For temporary calendar files, you may set <a href="#Directory">directory</a>/filename</a> using <em>PHP</em> functions sys_get_temp_dir() and tempnam().
- </p>
- <p>
- Do <b>NOT</b> set <a href="#Directory">directory</a>/filename</a> in <a href="#vcalendar_constr">vcalendar</a> constructor,
- due to inability to detect error (bool false) config return.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Filesize"></a><h4>3.1.5.12 Filesize</h4>
- <p>
- Only when getting configuration (using iCalcreator object method getConfig).<br>
- Returns the size of the file in bytes, to be invoked<br>
- - after "saveCalendar()"<br>
- or<br>
- - after a "setConfig( "directory" / "filename" )" and before/after "parse()".<br>
- Getting the filesize for a remote file (URL) will always return zero.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Language"></a><h4>3.1.5.13 Language</h4>
- <p>
- Language for the iCalcreator object instance and component TEXT value properties as defined in [RFC5546].
- </p>
- <p>
- Default empty.
- </p>
- <p>
- If NOT set in TEXT property parameters, language from component instance "setConfig( "language", ..)" method will be used, if set,
- otherwise language from <strong>calendar</strong> method "setConfig( "language", ..)" will be used, if set.
- </p>
- <p>
- The <strong>calendar</strong> property PRODID is always recreated when setting (<strong>calendar</strong>) language
- (, note <a href="#Unique_id">Unique_id</a>, below).
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="setPropertyNames"></a><h4>3.1.5.14 setPropertyNames</h4>
- <p>
- Returns array of property names for all set properties in component. "X-PROP" will be used when <a href="#X-PROPERTY_PROP">X-properties</a> are set.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="dTZID"></a><h4>3.1.5.15 TZID</h4>
- <p>
- General timezone, will be used if no TZID parameter is supplied when setting <a href="#DTSTART">DTSTART</a>,
- <a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a> or <a href="#RECURRENCE-ID">RECURRENCE-ID</a>, a TZID <b>auto completion</b>.
- </p>
- <p>
- Default empty.
- </p>
- <p>
- Note, some <strong>calendar</strong> software may also require calendar property <a href="#Additional_Descriptors">X-WR-TIMEZONE</a>
- and vtimezone component property <a href="#Additional_Descriptors">X-LIC-LOCATION</a>
- (to be set manually, examine also the <a href="#createTimezone">createTimezone</a> a timezoneHandler class method ).
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Unique_id"></a><h4>3.1.5.16 Unique_id</h4>
- <p>
- "Unique_id" is used in <strong>calendar</strong> property PRODID and component property <a href="#UID">UID</a>,
- both created automatically (, if not setting <a href="#UID">UID</a> manually.
- </p>
- <p class="quotes">PRODID
- The identifier is RECOMMENDED to be the identical syntax to the [RFC 822] addr-spec.
- A good method to assure uniqueness is to put the domain name or a domain literal IP address of the host on which
- </p>
- <p>
- Default <b>AUTOMATICALLY</b> generated by using <em>PHP</em> function gethostbyname( $_SERVER["SERVER_NAME"] )
- when running in a web server environment or "localhost" when using command line interface.
- Used when setting other (domain) name than server name.
- </p>
- <p>
- The <strong>calendar</strong> property PRODID is always recreated when setting unique_id.
- </p>
- <p>
- If missing, the component property <a href="#UID">UID</a> is created at first use of iCalcreator object methods <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a> or <a href="#saveCalendar">saveCalendar</a>
- </p>
- <p>
- A strong recommendation is <b>always</b> to set unique_id, creating a new iCalcreator object or component instance,
- to ensure accurate creation of all components <a href="#UID">UID</a> property, also before <a href="#parse">parse</a>, in case of missing <a href="#UID">UID</a>.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="configURL"></a><h4>3.1.5.17 URL</h4>
- <p>
- When reading remote files or resources with URL (using the <a href="#parse">parse()</a> method),
- protocol "http" ("webcal") and "https" are supported.
- </p>
- <p>
- When setting URL, the previously set <a href="#Directory">Directory</a> is removed.
- </p>
- <p>
- A remote file is identified by the file suffix ".ics", otherwise the URL is classified as a resource.
- When setting URL to a remote iCal <u>file</u>, only directory need to be (re-)set,
- filename remains unchanged (i.e. 1. set URL, 2. parse, 3. set directory, 4. saveCalendar).
- The URL remote file <u>file</u> part can be retrieved by the vcalendar method<br>
- getConfig( "filename" ).
- When using a resource, filename is unset (note <a href="#Filename">filename</a>, above).
- </p>
- <p class="label">Example</p>
- <p>Parse of remote file, then local save in "depot" folder, using original filename</p>
- <p class="example">
- $url = "http://www.iCal.net/depot/calendar.ics";
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$URL => $url );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vcalendar->parse();
- $vcalendar->sort();
- $vcalendar->setConfig( kigkonsult\iCalcreator\util\util::$DIRECTORY, "depot" );
- $vcalendar->saveCalendar();
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_configuration_methods">[up]</a>
- <a name="Calendar_component_object_property_function_list"></a><h2>3.2 Calendar component property method list</h2>
- <p>
- All iCalcreator component object property methods for get/set data.<br>
- For property format in detail, see
- <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
- </p>
- <a name="DATE_WITH_UTC_TIME"></a>
- <span class="label">Notice:</span> for properties and VALUE=DATE-TIME with <b>UTC</b> time.
- <p class="quotes">RFC2445:
- The date with UTC time, or absolute time,
- is identified by a LATIN CAPITAL LETTER Z suffix character (US-ASCII decimal 90),
- the UTC designator, appended to the time value.
- For example, the following represents January 19, 1998, at 0700 UTC:
- </p>
- <p class="quotes">DTSTART:19980119T070000Z</p>
- <p class="quotes">The <a href="#TZID">TZID</a> property parameter MUST <b>NOT</b> be applied to DATE-TIME properties
- whose time values are specified in UTC.
- </p>
- <p>
- <a name="date_restriction"></a>
- Due to a limitation in <em>PHP</em> date functions (on 32 bit systems),
- a date (ex. while setting <a href="#DTSTART">DTSTART</a> property)
- before 1970 or after GMT may force a <em>PHP</em> date function to generate an error or set date to "January 1 1970".
- Timezones need to be PHP complient!
- </p>
- <a name="deleteProperty_PROP"></a><h3>3.2.1 deleteProperty</h3>
- Generic iCalcreator object instance delete property method,simplifying removal of <strong>calendar</strong> properties.<br>
- Bool false is returned if no property exists or when end-of-properties at consecutive function calls.
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( [ PropName [, order ] )</p>
- <p class="comment">propName = (string) case independent, [RFC5545] component property names,
- unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
- order = (int) if missing 1st/next occurrence,
- used with multiply (property) occurrences</p>
- <p class="label">Example</p>
- <p>Remove all COMMENT properties in first event component.</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $event = $vcalendar->getComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- while( $event->deleteProperty( kigkonsult\iCalcreator\util\util::$COMMENT ))
- continue;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="getProperty_PROP"></a><h3>3.2.2 getProperty</h3>
- <a name="geoLocation_PROP"></a>
- <p>Generic iCalcreator component get property method, simplifying fetch of properties.</p>
- <p>Bool false is returned if no property exists or when end-of-properties at consecutive function calls.</p>
- <p>Using the non-standard directive "GEOLOCATION", iCalcreator returns output supporting<br>
- ISO6709 "Standard representation of geographic point location by coordinates",<br>
- by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
- (only if <a href="#GEO">GEO</a> is set).
- </p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::getProperty( PropName [, order [, complete ]] )</p>
- <p class="comment">propName = (string) case independent, [RFc5545] component property names,
- unknown/missing propName will be used as <a href="#X-PROPERTY_PROP">X-property</a>.
- order = (int) if missing/false 1st/next occurrence,
- otherwise with multiply occurrences (1st=1, 2nd=2)
- complete - (bool) false (default): output only property value
- true : output =
- array("value" => <value>
- ,"params"=> <parameter array>)</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$DIRECTORY => "import",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $vevent = $vcalendar->getComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT )) {
- $dtstart = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$DTSTART );
- // <span class="comment">one occurrence</span>
- $description = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION ); // <span class="comment">one occurrence</span>
- while( $comment = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$COMMENT )) { // <span class="comment">MAY occur more than once</span>
- }
- }
- </p>
- <p>
- To get iCalcreator object instance property values, use <a href="#getProperty">getProperty</a>.
- <p/>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="parse"></a><h3>3.2.3 parse</h3>
- <p>
- Parse iCal component property text from a string or an array.
- Each string/array row must be strict RFC5545 formatted, i.e. begin with a property name.
- </p>
- <p>
- Complete <a href="#VALARM">ALARM</a>s, all properties included, in array format and
- first array row as "BEGIN:VALARM", last as "END:VALARM"
- as well as <a href="#VTIMEZONE">TIMEZONE</a> and standard/daylight subcomponents.
- </p>
- <p>
- If major parse error occurs (like invalid <strong>calendar</strong> structure or no <strong>calendar</strong> components),
- bool false is returned.
- </p>
- <p>
- Minor errors like non-standard line-endings, initial and trailing empty lines
- as well as files without proper end line(-s) (i.e. missing component end iCal directives)
- are managed.
- </p>
- <p>
- Except the <a href="#X-PROPERTY_PROP">X-properties</a>, non-standard properties are ignored.
- </p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::parse( propertyText )</p>
- <p class="comment">propertyText = (string) [RFC5545] formatted property,
- (array) [RFC5545] formatted properties,
- property name <b>must</b> start string / rows(-s)</p>
- <p class="label">example</p>
- <p class="example">
- $e = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $e->parse( "DTSTAMP:19970324T1200Z" );
- $e->parse( "SEQUENCE:0" );
- $e->parse( "ORGANIZER:MAILTO:jdoe@host1.com" );
- $e->parse( array(
- "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com",
- "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host2.com",
- "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host3.com",
- "ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host4.com" ));
- $e->parse( "DTSTART:19970324T123000Z" );
- $e->parse( "DTEND:19970324T210000Z" );
- $e->parse( "CATEGORIES:MEETING,PROJECT" );
- $e->parse( "CLASS:PUBLIC" );
- $e->parse( "SUMMARY:Calendaring Interoperability Planning Meeting" );
- $e->parse( "STATUS:DRAFT" );
- $e->parse( "DESCRIPTION:Project xyz Review Meeting Minutes\\n "
- . "Agenda\\n "
- . "1. Review of project version 1.0 requirements.\\n "
- . "2. Definition of project processes.\\n "
- . "3. Review of project schedule.\\n "
- . "Participants: John Smith, Jane Doe, Jim Dandy\\n "
- . "- It was decided that the requirements need to be signed off by \\n "
- . "product marketing.\\n "
- . "- Project processes were accepted.\\n "
- . "- Project schedule needs to account for scheduled holidays and employee\\n "
- . " vacation time. Check with HR for specific dates.\\n "
- . "- New schedule will be distributed by Friday.\\n "
- . "- Next weeks meeting is cancelled. No meeting until 3/23." );
- $e->parse( "LOCATION:LDB Lobby" );
- $e->parse( "ATTACH;FMTTYPE=application/postscript:ftp://xyz.com/pub/conf/bkgrnd.ps" );
- $e->parse( array( "BEGIN:VALARM"
- , "ACTION:AUDIO"
- , "TRIGGER;VALUE=DATE-TIME:19970224T070000Z"
- , "ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud"
- , "REPEAT:4"
- , "DURATION:PT1H"
- , "X-alarm:non-standard ALARM property"
- , "END:VALARM" ));
- $e->parse( "X-xomment:non-standard property will be displayed, comma escaped");
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="setProperty_PROP"></a><h3>3.2.4 setProperty</h3>
- <p>
- Generic iCalcreator component object set property method, simplifying insert of properties. For properties where
- multiple occurrences are allowed, last parameter is an index, implementing replaceProperty functionality.
- </p>
- <p>A successful update returns bool true.</p>
- <p>
- To ease up usage, property name holders are found in top of the "util" class (src/util.php).
- </p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( PropName, Proparg_1 *[, Proparg_n] )</p>
- <p class="comment">propName = (string) case independent, [RFC5545] component property names,
- unknown propName will be regarded as (a non-standard) <a href="#X-PROPERTY_PROP">X-property</a>.
- Proparg_n = (mixed) property content
- Last property argument is a (optional) property dependent parameters
- array( *[(string) key => (string) value ] ).
- A non-standard (, experimental) parameter key MUST be prefixed by "X-".
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- array( "year" => 2007,
- "month"=> 4,
- "day" => 1,
- "hour" => 19));
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DURATION,
- 0, 0, 3 ));
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$LOCATION,
- "Central Plaza" );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$SUMMARY,
- "PHP summit" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="ACTION"></a><h3>3.2.5 ACTION</h3>
- <p>
- This property defines the action to be invoked when an <a href="#VALARM">VALARM</a> is triggered,
- <br> "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE".
- This property is REQUIRED and MUST NOT occur more than once. ("PROCEDURE" is deprecated in [RFC5545].)
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$ACTION as used in code snippets is available.
- </p>
- <h5>Create ACTION</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createAction()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createAction();
- </p>
- <h5>Delete ACTION</h5>
- <p>Remove ACTION from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "Action" )</p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ACTION );
- </p>
- <h5>Get ACTION</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "Action" )</p>
- <p class="comment">output = actionValue<sup>1</sup>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "Action", false , true )</p>
- <p class="comment">output = array( "value" => actionValue<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $action = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$ACTION );
- </p>
- <h5>Set ACTION</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "Action", actionValue [, xparams ] )</p>
- <p class="comment">actionValue<sup>1</sup> = (string) one of "AUDIO" / "DISPLAY" / "EMAIL" / "PROCEDURE"
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$ACTION,
- "DISPLAY" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="ATTACH"></a><h3>3.2.6 ATTACH</h3>
- <p>
- The property provides the capability to associate a document object with a <strong>calendar</strong> component. The property is
- is REQUIRED and MUST NOT occur more than once in an "ALARM" ("ACTION" "procedure"),
- OPTIONAL and MUST NOT occur more than once in an "ALARM" ("ACTION" "audio") and
- OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VALARM">VALARM</a> ("ACTION" "email") components.
- </p>
- <p>
- The default value type for ATTACH is URI. The value type can also be set to BINARY to indicate inline binary encoded content (params<sup>2</sup>).
- </p>
- <p>
- If using other parameters than the recommended "FMTTYPE" and the mandatory "ENCODING" (="BASE64")and "VALUE" (="BINARY")
- for an inline binary encoded attachment,
- please use only characters within the ASCII character set in parameter name and content,
- to ensure proper line folding when using <a href="#createCalendar">createCalendar</a> and/or <a href="#returnCalendar">returnCalendar</a>.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$ATTACH as used in code snippets is available.
- </p>
- <h5>Create ATTACH</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createAttach()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createAttach();
- </p>
- <h5>Delete ATTACH</h5>
- <p>Remove ATTACH from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "ATTACH" )</p>
- <p class="label">Example 1</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTACH );
- </p>
- <p class="label">Example 2</p>
- Delete ATTACH property no 2.
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTACH, 2 );
- </p>
- <p class="label">Example 3</p>
- Deleting all ATTACH properties.
- <p class="example">
- while( $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTACH ))
- continue;
- </p>
- <h5>Get ATTACH</h5>
- <p>If set, returns property value(-s), otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "Attach" )</p>
- <p class="comment">output = attachValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "ATTACH", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value,
- <p class="comment">output = array( "value" => attachValue<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "Attach", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo ATTACH</p>
- <p class="label">Example</p>
- <p class="example">
- $attach = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$ATTACH );
- </p>
- <h5>Set ATTACH</h5>
- <p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "attach", attachValue<sup>1</sup> [, params [, propOrderNo ]] )</p>
- <p class="comment">attachValue<sup>1</sup> = (string) URI / inline binary encoded content
- params<sup>2</sup> = (array ) ( [ "ENCODING" => "BASE64", "VALUE" => "BINARY" ]
- [, "FMTTYPE" => contentType ]
- *[, xparams ] )
- contentType = (string) The parameter value MUST be the TEXT for either an IANA
- registered content type or a non-standard content type.
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$ATTACH,
- "ftp://domain.com/pub/docs/agenda.doc",
- array( "FMTTYPE" => "application/binary" ));
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="ATTENDEE"></a><h3>3.2.7 ATTENDEE</h3>
- <p>
- The property defines an "Attendee" within a <strong>calendar</strong> component and is OPTIONAL and MUST NOT occur more than once
- in a VALARM ("ACTION" "email"), OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
- </p>
- <p>This value type for ATTENDEE is URI, a <strong>calendar</strong> user address.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ATTENDEE values.</p>
- <p>You can export <strong>calendar</strong> ATTENDEE values as <a href="#iCal2vCards">vCards</a>.
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$ATTENDEE as used in code snippets is available.
- </p>
- <h5>Create ATTENDEE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createAttendee()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createAttendee();
- </p>
- <h5>Delete ATTENDEE</h5>
- <p>Remove ATTENDEE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "ATTENDEE" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) ATTENDEE property</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE );
- </p>
- <p class="label">Example 2</p>
- <p>Delete ATTENDEE property no 2.</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE, 2 );
- </p>
- <p class="label">Example 3</p>
- Deleting all ATTENDEE properties.
- <p class="example">
- while( $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE ))
- continue;
- </p>
- <h5>Get ATTENDEE</h5>
- <p>If set, returns property value(-s), otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "Attendee" )</p>
- <p class="comment">output = attendeeValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "ATTENDEE", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => attendeeValue<sup>1</sup>
- , "params" => array( params<sup>2</sup> ))</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "ATTENDEE", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = attendeeValue<sup>1</sup></p>
- <p class="label">Example</p>
- <p class="example">
- $attendee = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE );
- </p>
- <h5>Set ATTENDEE</h5>
- <p>
- Insert property value. If exist, default parameter values are removed after input (params<sup>2</sup>).
- Property value must be prefixed by protocol (ftp://, http://,mailto:, file:// ref. rfc 1738 ),
- if missing, "mailto:" is set (indicating an internet mail address).
- Also MEMBER and DIR parameters must be prefixed by protocol. DELEGATED-TO, DELEGATED-FROM, SENT-BY parameters
- must use protocol "mailto:", prefixed if missing (indicating an internet mail address).
- </p>
- <p>
- The CN, ROLE, PARTSTAT, RSVP, CUTYPE, MEMBER, DELEGATED-TO,DELEGATED-FROM, SENT-BY and DIR
- properties are not accepted (i.e. removed) in a "VFREEBUSY" or "VALARM" "ATTENDEE" property content.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "attendee", attendeeValue [, params [, propOrderNo ]] )</p>
- <p class="comment">attendeeValue<sup>1</sup> = (string) a <strong>calendar</strong> user address, a URI as defined by
- [RFC 1738] or any other IANA registered form
- for a URI.
- params<sup>2</sup> = (array) ( [CUTYPE] [,MEMBER] [,ROLE] [,PARTSTAT]
- [,RVSP] [,DELEGATED-TO] [,DELEGATED-FROM]
- [,SENT-BY] [,CN] [,DIR] [,LANGUAGE]
- *[,xparams] )
- CUTYPE = "CUTYPE" => "INDIVIDUAL"
- (An individual, <b>Default</b>)
- / "GROUP"
- (A group of individuals)
- / "RESOURCE"
- (A physical resource)
- / "ROOM"
- (A room resource)
- / "UNKNOWN"
- (Otherwise not known)
- / (string) x-name
- (Experimental type)
- / iana-token
- (string) (Other IANA registered type)
- MEMBER = "MEMBER" => array( *[ (string) "single member
- of the group or list membership"])
- ROLE = "ROLE" => "CHAIR"
- (Indicates chair of the <strong>calendar</strong>
- entity)
- / "REQ-PARTICIPANT"
- (required participation, <b>Default</b>)
- / "OPT-PARTICIPANT"
- (optional participation)
- / "NON-PARTICIPANT"
- (information purposes only)
- / (string) x-name
- (Experimental role)
- / (string) iana-token
- (Other IANA role)
- PARTSTAT = "PARTSTAT" => "NEEDS-ACTION"
- (Event needs action, <b>Default</b>)
- / "ACCEPTED"
- (Event accepted)
- / "DECLINED"
- (Event declined)
- / "TENTATIVE"
- (Event tentatively accepted)
- / "DELEGATED"
- (Event delegated)
- / "NEEDS-ACTION"
- (To-do needs action, <b>Default</b>)
- / "ACCEPTED"
- (To-do accepted)
- / "DECLINED"
- (To-do declined)
- / "TENTATIVE"
- (To-do tentatively accepted)
- / "DELEGATED"
- (To-do delegated)
- / "COMPLETED"
- (To-do completed.
- <a href="#COMPLETED">COMPLETED</a> property
- has date/time completed)
- / "IN-PROCESS"
- (To-do in process of being completed)
- / "NEEDS-ACTION"
- (Journal needs action, <b>Default</b>)
- / "ACCEPTED"
- (Journal accepted)
- / "DECLINED"
- (Journal declined)
- / (string) x-name
- (Experimental status)
- / (string) iana-token
- (Other IANA registered status)
- RSVP = "RSVP" => (string) "TRUE"
- / "FALSE", <b>Default</b> (reply expectation)
- DELEGATED-TO = "DELEGATED-TO" => array(*[(string) "single <strong>calendar</strong> user
- to specified by the property
- has delegated participation"])
- DELEGATED-FROM = "DELEGATED-FROM" => array( *[ (string) "single <strong>calendar</strong> user that
- have delegated their
- participation to the
- <strong>calendar</strong> user specified
- by the property" ] )
- SENT-BY = "SENT-BY" => (string) single <strong>calendar</strong> user that is
- acting on behalf
- of the <strong>calendar</strong> user
- specified by the property"
- LANGUAGE = "LANGUAGE" => (string) "lang<sup>*</sup>" (applies to the CN parameter value)
- CN = "CN" => (string) "common name to be associated with the <strong>calendar</strong>
- user specified by the property"
- DIR = "DIR" => (string) "reference to a directory entry associated with
- the <strong>calendar</strong> user specified by the property"
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p>
- See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE,
- "attendee1@ical.net"
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$ATTENDEE,
- "attendee2@ical.net",
- array( "cutype" => "INDIVIDUAL",
- "member" => array( "member1@ical.net",
- "member2@ical.net",
- "member3@ical.net" ),
- "role" => "CHAIR",
- "PARTSTAT" => "ACCEPTED",
- "RSVP" => "TRUE",
- "DELEgated-to" => array( "part1@ical.net",
- "part2@ical.net",
- "part3@ical.net" ),
- "delegateD-FROM" =>array( "cio@ical.net",
- "vice.cio@ical.net"),
- "SENT-BY" => "secretary@ical.net",
- "LANGUAGE" => "us-EN",
- "CN" => "John Doe",
- "DIR" => "http://www.ical.net/info.doc",
- "x-agenda" => "status reports", <span class="comment">// xparam</span>
- "x-length" => "15 min" )); <span class="comment">// xparam</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="CATEGORIES"></a><h3>3.2.8 CATEGORIES</h3>
- <p>
- This property defines the categories for a <strong>calendar</strong> component and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>
- The value type for CATEGORIES is TEXT.
- </p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CATEGORIES values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CATEGORIES as used in code snippets is available.
- </p>
- <h5>Create CATEGORIES</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createCategories()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createCategories();
- </p>
- <h5>Delete CATEGORIES</h5>
- <p>Remove CATEGORIES from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "CATEGORIES" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) CATEGORIES property</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CATEGORIES );
- </p>
- <p class="label">Example 2</p>
- <p>Delete CATEGORIES property no 2.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CATEGORIES, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all CATEGORIES properties.</p>
- <p class="example">
- while( $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CATEGORIES ))
- continue;
- </p>
- <h5>Get CATEGORIES</h5>
- <p>If set, returns property value(-s), otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "CATEGORIES" )</p>
- <p class="comment">output = categoryValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "CATEGORIES", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => categories<sup>1</sup>
- , "params" => params<sup>3</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "CATEGORIES", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo CATEGORIES</p>
- <p class="label">Example</p>
- <p class="example">
- $categories = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$CATEGORIES );
- </p>
- <h5>Set CATEGORIES</h5>
- <p>Insert property value.</p>
- <p>
- In spite of the fact that CATEGORIES may contain a (comma separated) list of values,
- a strong recommendation is to split a CATEGORIES "list" into multiple single CATEGORIES entries.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "categories", categories [, params [, propOrderNo ]] )</p>
- <p class="comment">categories<sup>1</sup> = (string) categoryValue / (array) ( *categoryValue )
- categoryValue<sup>2</sup> = (string) textual categories or subtypes of the <strong>calendar</strong> component,
- can be specified as a list of categories
- separated by the COMMA character
- params<sup>3</sup> = (array) ( ["LANGUAGE" => (string) "<lang<sup>*</sup>>"] *[, xparams] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$CATEGORIES,
- "project_x" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="CLASS"></a><h3>3.2.9 CLASS</h3>
- <p>
- This property defines the access classification for a <strong>calendar</strong> component and is OPTIONAL
- and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CLASS as used in code snippets is available.
- </p>
- <h5>Create CLASS</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createClass()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createClass();
- </p>
- <h5>Delete CLASS</h5>
- <p>Remove CLASS from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "CLASS" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$CLASS );
- </p>
- <h5>Get CLASS</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "CLASS" )</p>
- <p class="comment">output = classValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "CLASS", false , true )</p>
- <p class="comment">output = array "value" => classValue<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $class = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$CLASS );
- </p>
- <h5>Set CLASS</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "class", classvalue [, xparams ] )</p>
- <p class="comment">classvalue<sup>1</sup> = "PUBLIC"
- / "PRIVATE"
- / "CONFIDENTIAL"
- / (string) iana-token
- / (string) x-name
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$CLASS,
- "CONFIDENTIAL" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="COMMENT"></a><h3>3.2.10 COMMENT</h3>
- <p>
- This property specifies non-processing information intended to provide a comment to the <strong>calendar</strong> user
- and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>, <a href="#VFREEBUSY">VFREEBUSY</a>, <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
- </p>
- <p>The value type for COMMENT is TEXT.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$COMMENT as used in code snippets is available.
- </p>
- <h5>Create COMMENT</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createComment()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createComment();
- </p>
- <h5>Delete COMMENT</h5>
- <p>Remove COMMENT from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "COMMENT" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) COMMENT property</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$COMMENT );
- </p>
- <p class="label">Example 2</p>
- <p>Delete COMMENT property no 2.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$COMMENT, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all COMMENT properties.</p>
- <p class="example">
- while( $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$COMMENT ))
- continue;
- </p>
- <h5>Get COMMENT</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "COMMENT" )</p>
- <p class="comment">output = commentValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "COMMENT", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => commentValue<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "COMMENT", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo COMMENT</p>
- <p class="label">Example</p>
- <p class="example">
- $comment = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$COMMENT );
- </p>
- <h5>Set COMMENT</h5>
- <p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "comment", commentValue [, params [, propOrderNo ]] )</p>
- <p class="comment">commentValue<sup>1</sup> = (string) Value type Text
- params<sup>2</sup> = (array) (
- [ "ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$COMMENT,
- "this is a comment" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="COMPLETED"></a><h3>3.2.11 COMPLETED</h3>
- <p>
- This property defines the date and time that a <a href="#VTODO">VTODO</a> was actually completed and is OPTIONAL and MUST NOT occur more than once.
- </p>
- <p>The value type for COMPLETED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
- <p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CREATED as used in code snippets is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="CONTACT"></a><h3>3.2.12 CONTACT</h3>
- <p>
- The property is used to represent textual contact information or alternately a reference to textual contact information
- associated with the <strong>calendar</strong> component. The property is OPTIONAL and MUST NOT occur more than once in
- a VFREEBUSY or MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a> and
- <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>The value type for CONTACT is TEXT.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) CONTACT values.</p>
- <p>You can export <strong>calendar</strong> CONTACT values as <a href="#iCal2vCards">vCards</a>.
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CONTACT as used in code snippets is available.
- </p>
- <h5>Create CONTACT</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createContact()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createContact();
- </p>
- <h5>Delete CONTACT</h5>
- <p>Remove CONTACT from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "CONTACT" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) CONTACT property<p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CONTACT );
- </p>
- <p class="label">Example 2</p>
- <p>Delete CONTACT property no 2.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CONTACT, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all CONTACT properties.</p>
- <p class="example">
- while( $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CONTACT ))
- continue;
- </p>
- <h5>Get CONTACT</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "CONTACT" )</p>
- <p class="comment">output = contactValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "CONTACT", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => contactValue<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "CONTACT", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo CONTACT</p>
- <p class="label">Example</p>
- <p class="example">
- $contact = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$CONTACT );
- </p>
- <h5>Set CONTACT</h5>
- <p>Insert property value. Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "contact", contactValue [, params [, propOrderNo ]] )</p>
- <p class="comment">contactValue<sup>1</sup> = (string) Value type TEXT
- params<sup>2</sup> = (array) (
- [ "ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $c->setProperty( kigkonsult\iCalcreator\util\util::$CONTACT,
- "tel 012-34 56 789" )
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="CREATED"></a><h3>3.2.13 CREATED</h3>
- <p>
- This property specifies the date and time that the <strong>calendar</strong> information was created by
- the <strong>calendar</strong> user agent in the <strong>calendar</strong> store.
- Note: This is analogous to the creation date and time for a file in the file system.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>The value type for CREATED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$CREATED as used in code snippets is available.
- </p>
- <h5>Create CREATED</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createCreated()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createCreated();
- </p>
- <h5>Delete CREATED</h5>
- <p>Remove CREATED from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "CREATED" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$CREATED );
- </p>
- <h5>Get CREATED</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "CREATED" )</p>
- <p class="comment">output = createdDate<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "CREATED", false , true )</p>
- <p class="comment">output = array( "value" => createdDate<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $created = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$CREATED );
- </p>
- <h5>Set CREATED</h5>
- <p>
- Insert property value. Input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME or,
- if "offset" parameter is used, converted to a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
- Notice, youn can use the <a href="#transformDateTime">timezoneHandler::transformDateTime()</a> method to change a local datetime to UTC datetime.
- </p>
- <p>The current UTC date-time is set if invoked without parameters.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "created", [ createdDate [, xparams ]] )</p>
- <p class="comment">createdDate<sup>1</sup> = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec
- , "tz" => offset ]] )
- createdDate = (int) year
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec ]
- createdDate = (array) ( (int) year
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec
- [, offset ]] )
- createdDate = (array) ( "timestamp" => (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- createdDate = (string) date/datetime string<sup>*</sup>
- offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- xparams<sup>2</sup> = array( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- trailing characters (digits), if exists, will be interpreted as offset
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtodo = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTODO );
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$CREATED,
- 2006, 8, 11, 14, 30, 35 ); // <span class="comment">11 august 2006 14.30.35 UTC</span>
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $date = array("year" => 2006, "month" => 10, "day" => 10,
- "hour" => 10, "min" => 0, "sec" => 0, "tz" => "+0200");
- // <span class="comment">local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$CREATED,
- $date );
- </p>
- <p class="label">Example 3</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$CREATED ); // <span class="comment">current UTC date-time is set if invoked without parameters</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DESCRIPTION"></a><h3>3.2.14 DESCRIPTION</h3>
- <p>
- This property provides a more complete textual description of the <strong>calendar</strong> component,
- than that provided by the <a href="#SUMMARY">SUMMARY</a> property (, analogous to a mail BODY).
- The property is OPTIONAL, MUST NOT occur more than once within <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a> or <a href="#VALARM">VALARM</a> (PROCEDURE) but can be specified multiple
- times within a <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component. The property is REQUIRED in <a href="#VALARM">VALARM</a> (DISPLAY, EMAIL) component.
- </p>
- <p>The value type for DESCRIPTION is TEXT.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DESCRIPTION as used in code snippets is available.
- </p>
- <h5>Create DESCRIPTION</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createDescription()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createDescription();
- </p>
- <h5>Delete DESCRIPTION</h5>
- <p>Remove DESCRIPTION from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "DESCRIPTION" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) DESCRIPTION property.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION );
- </p>
- <p class="label">Example 2</p>
- <p>Delete DESCRIPTION property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all DESCRIPTION properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION ))
- continue;
- </p>
- <h5>Get DESCRIPTION</h5>
- <p>If set, returns property value(-s), otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "DESCRIPTION" )</p>
- <p class="comment">output = descriptionValue<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "DESCRIPTION", false , true )</p>
- <p class="comment">output = array( "value" => descriptionValue<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $description = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION );
- </p>
- <h5>Set DESCRIPTION</h5>
- <p>Insert property value.</p>
- <br>
- Parameters will be ordered as prescribed in [RFC5545].
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "description", descriptionValue [, params [, propOrderNo ]] )</p>
- <p class="comment">descriptionValue<sup>1</sup> = (string) Value type TEXT
- params<sup>2</sup> = (array) (
- [ "ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DESCRIPTION,
- "This is a description" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DTEND"></a><h3>3.2.15 DTEND</h3>
- <p>
- This property specifies the date and time that a <strong>calendar</strong> component ends.
- The property is OPTIONAL and MUST NOT occur more than once in VFREEBUSY and VEVENT. In VEVENT, it only occurs
- if DURATION NOT occurs.
- </p>
- <p>
- The default value type for DTEND is DATE-TIME, can be set to a DATE value type.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DTEND as used in code snippets is available.
- </p>
- <p class="quotes">
- The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
- </p>
- <p>
- Notice that an end date without a time is in effect midnight of the day before the date,
- so for timeless dates, use the date following the event date for it to be correct.
- For an "all-day event" and using timeless dates, the DTEND is equal DTSTART plus one day,
- example all-day event (2007-12-01)<br>DTSTART;VALUE=DATE:20071201<br> DTEND;VALUE=DATE:20071202.
- </p>
- <h5>Create DTEND</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createDtend()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createDtend();
- </p>
- <h5>Delete DTEND</h5>
- <p>Remove DTEND from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "DTEND" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$DTEND );
- </p>
- <h5>Get DTEND</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "DTEND" )</p>
- <p class="comment">output = dtendDate<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "DTEND", false , true )</p>
- <p class="comment">output = array( "value" => dtendDate<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $dtend = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$DTEND );
- </p>
- <h5>Set DTEND</h5>
- <p>
- Insert property value. If DATE value type is expected, "VALUE" = "DATE" <b>must</b> be set
- (in params<sup>2</sup>) otherwise DATE-TIME (default) value type is set.
- </p>
- <p>
- If no timezone parameter (tz or tzidparam below) is set (i.e.local time) and config <a href="#dTZID">TZID</a> is set,
- date-time values will be set WITH timezone from config.
- Notice, use function <a href="#transformDateTime">transformDateTime</a> to change a datetime from one time zone to another.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "dtend", dtendDate [, params<sup>2</sup> ] )
- <p class="comment">dtendDate<sup>1</sup> = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec
- [, "tz" => tz ]] )
- dtendDate = (int) year
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec
- [, tz ]]
- dtendDate = array( (int) year
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec
- [, tz ]] )
- dtendDate = (array) ( "timestamp" => (int) timestamp [,"tz" => tz])
- // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- // <span class="comment">timestamp with tz=offset will result in a local DATE-TIME</span>
- dtendDate = (string) date/datetime string<sup>*</sup>
- // <span class="comment">Within the "VFREEBUSY" <strong>calendar</strong> component,</span>
- // <span class="comment">the time MUST be specified in the <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- tz = (string) <timezone identifier> / offset
- // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
- offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset</span>
- // <span class="comment">will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- params<sup>2</sup> = (array) ([ tzidparam/datetimeparam/dateparam ] *[,xparams])
- tzidparam = kigkonsult\iCalcreator\util\util::$TZID => (string) <timezone identifier>
- // <span class="comment">output as local date-time with timezone identifier</span>
- // <span class="comment">if tzidparam="GMT"/"UTC" then</span>
- // <span class="comment">output date-time is suffixed by 'Z'</span>
- datetimeparam = "VALUE" => "DATE-TIME" // <span class="comment">default, output as date-time</span>
- dateparam = "VALUE" => "DATE" // <span class="comment">output as DATE, ex. all-day event</span>
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- trailing characters (digits), if exists, will be interpreted as offset/timezone
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example 1</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTEND,
- 2006, 8, 11, 16, 30, 0 ); <span class="comment">// 11 august 2006 16.30.00 local date</span>
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $vfreebusy->setProperty( kigkonsult\iCalcreator\util\util::$DTEND,
- 2006, 8, 11, 16, 30, 0, "-040000" );
- <span class="comment">// 11 august 2006 16.30.00 -040000</span>
- <span class="comment">// local date + UTC offset will result in a <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- </p>
- <p class="label">Example 3</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTEND,
- array( "year" =>, 2006, "month" => 8, "day"=> 11 ),
- array( "VALUE" => "DATE" ));
- <span class="comment">// end of an all-day event</span>
- </p>
- <p class="label">Example 4</p>
- <p class="example">
- $calendar->setConfig( kigkonsult\iCalcreator\util\util::$TZID, 'Europe/Stockholm' );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTEND,
- 2006, 8, 11, 7, 30, 0 );
- <span class="comment">// output: DTEND;TZID=Europe/Stockholm:20060811T073000</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DTSTAMP"></a><h3>3.2.16 DTSTAMP</h3>
- <p>
- The property indicates the date/time the instance of the <strong>iCalendar</strong> object was created and is OPTIONAL and
- MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>
- and <a href="#VFREEBUSY">VFREEBUSY</a> components. However, DTSTAMP is <b>AUTOMATICALL§Y GENERATED</b> in iCalcreator when creating a component.
- </p>
- <p>
- DTSTAMP may be required when importing iCal files into some <strong>calendar</strong> software<br>(MS etc.),
- as well as (<strong>calendar</strong>) <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and<br>"X-WR-TIMEZONE",
- <a href="#METHOD">METHOD</a> property (value PUBLISH etc.) and the (also auto created) <a href="#UID">UID</a> property.
- </p>
- <p>The value type for DTSTAMP is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
- <p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) DTSTAMP values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DTSTAMP is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DTSTART"></a><h3>3.2.17 DTSTART</h3>
- <p>
- This property specifies when the <strong>calendar</strong> component begins.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
- The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
- </p>
- <p>The default value type for DTSTART is DATE-TIME, can be set to a DATE value type.</p>
- <p>
- For an "all-day event" and using timeless dates, example (2007-12-01)<br>
- DTSTART;VALUE=DATE:20071201<br>
- DTEND;VALUE=DATE:20071202. // <span class="comment">opt., in effect midnight of the day <u>before</u> the date!!</span>
- </p>
- <p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DTSTART is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DUE"></a><h3>3.2.18 DUE</h3>
- <p>
- This property defines the date and time when a <a href="#VTODO">VTODO</a> is expected to be completed
- and is OPTIONAL and MUST NOT occur more than once and only if DURATION NOT occurs.
- </p>
- <p>
- The default value type for DUE is DATE-TIME, can be set to a DATE value type.
- </p>
- <p class="quotes">
- The value type of the "DTEND" or "DUE" properties MUST match the value type of "DTSTART" property as defined in [RFC5545])
- </p>
- <p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DUE is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="DURATION"></a><h3>3.2.19 DURATION</h3>
- <p>The property specifies a positive duration of time.</p>
- <dl>
- <dt>In a <a href="#VEVENT">VEVENT</a>
- <dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DTEND. If one occurs, so MUST NOT the other.<br>
- <dt>In a <a href="#VTODO">VTODO</a>
- <dd>it is OPTIONAL and MUST NOT occur more than once and MUST NOT occur in pair with DUE. If one occurs, so MUST NOT the other.<br>
- <dt>In a <a href="#VFREEBUSY">VFREEBUSY</a>
- <dd>it is OPTIONAL and MUST NOT occur more than once. ([RFC2445])<br>
- <dd>it can not appear. ([RFC5545])<br>
- <dt>In a <a href="#VALARM">VALARM</a>
- <dd>it is OPTIONAL and MUST NOT occur more than once and MUST occur in pair with TRIGGER. If one occurs, so MUST the other.
- </dl>
- <p>
- If any hour/minute/second duration part is set, all parts are included in output (ex. one hour duration: "PT1H0M0S").
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$DURATION as used in code snippets is available.
- </p>
- <h5>Create DURATION</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createDuration()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createDuration();
- </p>
- <h5>Delete DURATION</h5>
- <p>Remove DURATION from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "DURATION" )</p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$DURATION );
- </p>
- <h5>Get DURATION</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "DURATION" )</p>
- <p class="comment">output = duration<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "DURATION", false , true )</p>
- <p class="comment">output = array( "value" => duration<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $duration = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$DURATION );
- </p>
- <p class="label">option</p>
- <p>
- If a 4th argument is used and set to true, returned output is in a DATE-TIME
- output format (like <a href="#DTEND">DTEND</a> / <a href="#DUE">DUE</a>), based on
- <a href="#DTSTART">DTSTART</a> value with the added DURATION value (incl. opt. timezone).
- </p>
- <h5>Set DURATION</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "duration", duration [, xparams ] )</p>
- <p class="comment">
- duration<sup>1</sup> = (array) ( "week" => (int) week )
- duration<sup>1</sup> = array ( "day" => (int) day )
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ])
- duration = (array) ( "sec" => (int) sec )
- duration = (array) ( (int) week/false
- [, (int) day/false
- [, (int) hour
- , (int) min
- , (int) sec ]] )
- duration = (int) week/false
- [, (int) day/false
- [, (int) hour
- , (int) min
- , (int) sec ]]
- duration = (string) dur-value = ["+"] "P" (dur-date/dur-time/dur-week)
- dur-date = dur-day [dur-time]
- dur-time = "T" (dur-hour / dur-minute / dur-second)
- dur-week = 1*DIGIT "W"
- dur-hour = 1*DIGIT "H" [dur-minute]
- dur-minute = 1*DIGIT "M" [dur-second]
- dur-second = 1*DIGIT "S"
- dur-day = 1*DIGIT "D"
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example 1</p>
- <p>One day duration.</p>
- <p class="example">
- $vtodo->setProperty kigkonsult\iCalcreator\util\util::$DURATION ,
- array( "day" => 1 ));
- </p>
- <p class="label">Example 2</p>
- <p>Four hours duration.</p>
- <p class="example">
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$DURATION,
- "PT4H" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="EXDATE"></a><h3>3.2.20 EXDATE</h3>
- <p>
- This property defines the list of date/time exceptions for a recurring <strong>calendar</strong> component and is OPTIONAL
- and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>The default value type for EXDATE is DATE-TIME, can be set to a DATE value type.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$EXDATE as used in code snippets is available.
- </p>
- <h5>Create EXDATE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createExdate()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createExdate();
- </p>
- <h5>Delete EXDATE</h5>
- <p>Remove EXDATE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "EXDATE" )</p>
- <p class="label">Example 1</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$EXDATE );
- </p>
- <p class="label">Example 2</p>
- <P>Delete EXDATE property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$EXDATE, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all EXDATE properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$EXDATE ))
- continue;
- </p>
- <h5>Get EXDATE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "EXDATE" )<p>
- <p class="comment">output = exdates<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "exdate", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => exdates<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "EXDATE", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo EXDATE</p>
- <p class="label">Example</p>
- <p class="example">
- $exdate = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$EXDATE );
- </p>
- <h5>Set EXDATE</h5>
- <p>Insert property value.</p>
- <p>The value type for EXDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
- <p>
- If DATE value type is set in params ("VALUE" = "DATE"), all timezone or offset in dates are ignored.<br>
- If no "VALUE" value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
- </p>
- <p>
- If "TZID" is set in params,
- all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
- If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
- If no "TZID" is set in params and timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.<br>
- If none of the above rules are applicable, DATE-TIME and local date is set default.
- </p>
- <p>
- Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
- </p>
- <p>EXDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
- <p>
- In spite of the fact that EXDATE may contain a (comma separated) list of values,
- a strong recommendation is to split a EXDATE "list" into multiple single EXDATE entries.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "exdate", exdates [, params [, propOrderNo ]] )</p>
- <p class="comment">exdates<sup>1</sup> = (array) ( date *[, date ] )
- date = array( (int) year
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec
- [, tz ]] )
- date<sup>1</sup> = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec
- [, "tz" => tz ]] )
- date = (array) ( "timestamp" => (int) timestamp [, "tz" => tz])
- // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- date = (string) date/datetime string<sup>*</sup>
- tz = (string) <timezone identifier> / offset
- // <span class="comment">timezone will be used as tzidparam (below), if tzidparam not set</span>
- offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- params<sup>2</sup> = (array) ([(datetimeparam/dateparam) / tzidparam] *[,xparams])
- datetimeparam = "VALUE" => "DATE-TIME" // <span class="comment">default, output as date-time</span>
- dateparam = "VALUE" => "DATE" // <span class="comment">output as DATE</span>
- tzidparam = kigkonsult\iCalcreator\util\util::$TZID => (string) <timezone identifier>
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- trailing characters (digits), if exists, will be interpreted as offset/timezone
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="commsnt">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example 1</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$EXDATE,
- array( array( 2006, 8, 14, 16, 0, 0 ));
- <span class="comment">// exclude 2006-08-14 16.00.00 (local date) from recurrence pattern</span>
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$EXDATE,
- array( array("year" =>,2006,"month" => 8,"day"=> 11)),
- array( "VALUE" => "DATE" ));
- <span class="comment">// exclude 2006-08-11 from recurrence pattern;</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="EXRULE"></a><h3>3.2.21 EXRULE</h3>
- <p>
- This property defines a rule or repeating pattern for an exception to a recurrence set and is OPTIONAL
- and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>EXRULE is deprecated in [RFC5545]!</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$EXRULE as used in code snippets is available.
- </p>
- <h5>Create EXRULE</h5>
- <p>If set, returns [RFC2445] formatted string, otherwise bool false.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createExrule()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createExrule();
- </p>
- <h5>Delete EXRULE</h5>
- <p>Remove EXRULE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "EXRULE" )</p>
- <p class="label">Example 1</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$EXRULE );
- </p>
- <p class="label">Example 2</p>
- <p>Delete EXRULE property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$EXRULE, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all EXRULE properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$EXRULE ))
- continue;
- </p>
- <h5>Get EXRULE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "EXRULE" )</p>
- <p class="comment">output = recur<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "exrule", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => recur<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "EXRULE", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo EXRULE</p>
- <p class="label">Example</p>
- <p class="example">
- $exrule = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$EXRULE );
- </p>
- <h5>Set EXRULE</h5>
- <p>
- Insert property value.
- Notice, use function <a href="#transformDateTime">transformDateTime</a>to change a local datetime to a UTC datetime.
- </p>
- <p>Parameters, will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "exrule", recur [, xparams [, propOrderNo ]] )</p>
- See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
- <p class="comment">recur<sup>1</sup> = (array) ( "FREQ" => freq
- // <span class="comment">either UNTIL or COUNT may appear in a "recur",
- but UNTIL and COUNT MUST NOT occur in the same "recur"</span>
- [, "UNTIL" "=>" >enddate ]
- [, "COUNT" "=>" 1*DIGIT ]
- // <span class="comment">the rest of these keywords are optional,
- but MUST NOT occur more than once</span>
- [, "INTERVAL" "=>" 1*DIGIT ]
- [, "BYSECOND" "=>" byseclist ]
- [, "BYMINUTE" "=>" byminlist ]
- [, "BYHOUR" "=>" byhrlist ]
- [, "BYDAY" "=>" bywdaylist ]
- [, "BYMONTHDAY" "=>" bymodaylist ]
- [, "BYYEARDAY" "=>" byyrdaylist ]
- [, "BYWEEKNO" "=>" bywknolist ]
- [, "BYMONTH" "=>" bymolist ]
- [, "BYSETPOS" "=>" bysplist ]
- [, "WKST" "=>" weekday ]
- [, x-name "=>" (string) text ] )
- freq = "SECONDLY" /
- "MINUTELY" /
- "HOURLY" /
- "DAILY" /
- "WEEKLY" /
- "MONTHLY" /
- "YEARLY"
- enddate = date // <span class="comment">a DATE value or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value</span>
- date = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ])
- date = (array) ( "timestamp" => (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- date = (string) date/datetime string<sup>*</sup>
- byseclist = seconds
- byseclist = (array) (seconds *(, seconds ))
- seconds = 1DIGIT / 2DIGIT ;0 to 59
- byminlist = minutes
- byminlist = (array) ( minutes *(, minutes ))
- minutes = 1DIGIT / 2DIGIT ;0 to 59
- byhrlist = hour
- byhrlist = (array) ( hour *(, hour ))
- hour = 1DIGIT / 2DIGIT ;0 to 23
- bywdaylist = weekdaynum
- bywdaylist = (array) ( weekdaynum *("," weekdaynum ))
- weekdaynum = (array) ( [([plus] ordwk / minus ordwk)], "DAY" => weekday )
- plus = "+"
- minus = "-"
- ordwk = 1DIGIT / 2DIGIT ;1 to 53
- weekday = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
- ; Corresponding to
- ; SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
- ; FRIDAY and SATURDAY days of the week.
- bymodaylist = monthdaynum
- bymodaylist = (array) ( monthdaynum *(, monthdaynum ))
- monthdaynum = ( [plus] ordmoday ) / ( minus ordmoday )
- ordmoday = 1DIGIT / 2DIGIT ;1 to 31
- byyrdaylist = yeardaynum
- byyrdaylist = (array) ( yeardaynum *(, yeardaynum ))
- yeardaynum = ( [plus] ordyrday ) / ( minus ordyrday )
- ordyrday = 1DIGIT / 2DIGIT / 3DIGIT ;1 to 366
- bywknolist = weeknum
- bywknolist = (array) ( weeknum *(, weeknum ))
- weeknum = ( [plus] ordwk ) / ( minus ordwk )
- bymolist = monthnum
- bymolist = (array) ( monthnum *(, monthnum ))
- monthnum = 1DIGIT / 2DIGIT ;1 to 12
- bysplist = setposday
- bysplist = (array) ( setposday *(, setposday ))
- setposday = yeardaynum
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( "Exrule",
- array( "FREQ" => "MONTHLY",
- "UNTIL" => "20060831",
- // <span class="comment">DATE / DATE-TIME in <a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> format; string/array, see <a class="ref" href="#CREATED">CREATED</a> format</span>
- "INTERVAL" => 2,
- "WKST" => "SU",
- "BYSECOND" => 2,
- "BYMINUTE" => array( 2, -4, 6 ), // (*)
- "BYHOUR" => array( 2, 4, -6 ), // (*)
- "BYMONTHDAY" => -2, // (*)
- "BYYEARDAY" => 2, // (*)
- "BYWEEKNO" => array( 2, -4, 6 ), // (*)
- "BYMONTH" => 2, // (*)
- "BYSETPOS" => array( 2, -4, 6 ), // (*)
- "BYday" => array( array(-2, "DAY" => "WE" ),
- array( 3, "DAY" => "TH"),
- array( 5, "DAY" => "FR"),
- array( "DAY" => "MO")), // (**)
- "X-NAME" => "x-value" ),
- array( "x-key" => "xparamValue" ));
- $vtodo->setProperty( >kigkonsult\iCalcreator\util\util::$EXRULE,
- array( "FREQ" => "WEEKLY",
- "COUNT" => 2,
- "INTERVAL" => 2,
- "WKST" => "SU",
- "BYSECOND" => array( -2, 4, 6 ), // (*)
- "BYMINUTE" => -2, // (*)
- "BYHOUR" => 2, // (*)
- "BYMONTHDAY" => array( 2, -4, 6 ), // (*)
- "BYYEARDAY" => array( -2, 4, 6 ), // (*)
- "BYWEEKNO" => -2, // (*)
- "BYMONTH" => array( 2, 4, -6 ), // (*)
- "BYSETPOS" => -2, // (*)
- "BYday" => array( 5, "DAY" => "WE" ), // (**)
- "X-NAME" => "x-value" ),
- array( "x-key" => "xparamValue" ));
- // <span class="comment">(*) single value/array of values</span>
- // <span class="comment">(**) single value array /array of arrays</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="FREEBUSY_PROP"></a><h3>3.2.22 FREEBUSY</h3>
- <p>
- The property defines one or more free or busy time intervals in a <a href="#VFREEBUSY">VFREEBUSY</a>
- <strong>calendar</strong> component.
- <p>
- <p>The value type for FREEBUSY is PERIOD. A PERIOD is a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/DATE-TIME or a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME/duration.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$FREEBUSY as used in code snippets is available.
- </p>
- <h5>Create FREEBUSY</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createFreebusy()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createfreebusy();
- </p>
- <h5>Delete FREEBUSY</h5>
- <p>Remove FREEBUSY from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "FREEBUSY" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) FREEBUSY property</p>
- <p class="example">
- $vfreebusy->deleteProperty( kigkonsult\iCalcreator\util\util::$FREEBUSY );
- </p>
- <p class="label">Example 2</p>
- <p>Delete FREEBUSY property no 2.</p>
- <p class="example">
- $vfreebusy->deleteProperty( kigkonsult\iCalcreator\util\util::$FREEBUSY, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all FREEBUSY properties.</p>
- <p class="example">
- while( $vfreebusy->deleteProperty( kigkonsult\iCalcreator\util\util::$FREEBUSY ))
- continue;
- </p>
- <h5>Get FREEBUSY</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "FREEBUSY" )</p>
- <p class="comment">output = array( "fbtype" => freebusytype<sup>1</sup> , periods<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "FREEBUSY", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => array("fbtype" => freebusytype<sup>1</sup> ,periods<sup>2</sup>)
- , "params" => xparams<sup>3</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "FREEBUSY", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo FREEBUSY</p>
- <p class="label">Example</p>
- <p class="example">
- $freebusy = $vfreebusy->getProperty( kigkonsult\iCalcreator\util\util::$FREEBUSY );
- </p>
- <h5>Set FREEBUSY</h5>
- Insert property value. A FREEBUSY input date is always a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "freebusy",freebusytype,fbperiods [,xparams [,propOrderNo ]] )</p>
- <p class="comment">freebusytype<sup>1</sup> = one of "FREE"
- / "BUSY" <b>Default</b>
- / "BUSY-UNAVAILABLE"
- / "BUSY-TENTATIVE"
- / x-name
- fbperiods = (array) ( periods<sup>2</sup> )
- periods<sup>2</sup> = (array) ( startdate, enddate/duration ) /
- (array) ( *[, (array) ( startdate, enddate/duration )] )
- startdate/enddate = (array) ( (int) year
- , (int) month
- , (int) day
- , (int) hour
- , (int) min
- , (int) sec )
- startdate/enddate = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- , "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ) // <span class="comment">output format</span>
- startdate/enddate = (array) ( "timestamp" => (int) timestamp ) // <span class="comment">results in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- startdate/enddate = (string) datetime string<sup>*</sup>
- // <span class="comment">startdate/enddate MUST be an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- duration = (array) ( (int) week / false
- [, (int) day / false
- , (int) hour
- , (int) min
- , (int) sec] )
- duration = (array) ( "week" => (int) week / false
- [, "day" => (int) day / false
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ]] ); // <span class="comment">output format</span>
- duration = (array) ( "sec" => (int) sec )
- duration = (string) dur-value
- = (["+"]/"-") "P" (dur-date/dur-time/dur-week)
- dur-date = dur-day [dur-time]
- dur-time = "T" (dur-hour / dur-minute / dur-second)
- dur-week = 1*DIGIT "W"
- dur-hour = 1*DIGIT "H" [dur-minute]
- dur-minute = 1*DIGIT "M" [dur-second]
- dur-second = 1*DIGIT "S"
- dur-day = 1*DIGIT "D"
- xparams<sup>3 </sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example</p>
- See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
- <p class="example">
- $fdate1 = array ( 2001, 1, 1, 1, 1, 1 );
- alt.
- $fdate1 = array ( "year" => 2001
- , "month" => 1
- , "day" => 1
- , "hour" => 1
- , "min" => 1
- , "sec" => 1 );
- $fdate2 = array ( 2002, 2, 2, 2, 2, 2 );
- $fdate3 = array ( 2003, 3, 3, 3, 3, 3 );
- $fdate4 = "4 April 2005 4:4:4";
- $fdate7 = array ( "year" => 2007
- , "month" => 7
- , "day" => 7 );
- $fdur6 = array ( "week" => 0
- , "day" => 5
- , "hour" => 5
- , "min" => 5
- , "sec" => 5 );
- $fdur7 = array ( 0, 0, 6 ); // <span class="comment">duration for 6 hours</span>
- $fdur8 = "P2D"; // <span class="comment">duration two days</span>
- $freebusy->setProperty kigkonsult\iCalcreator\util\util::$FREEBUSY,
- "FREE",
- array( array( $fdate1, $fdate2 ),
- array( $fdate3, $fdur6 ),
- array( $fdate4, $fdate5 )));
- $freebusy->setProperty(kigkonsult\iCalcreator\util\util::$FREEBUSY,
- "Busy",
- array( array( array( $fdate1, $fdate2 ),
- array( $fdate3, $fdur8 ),
- array( $fdate4, $fdur7 ),
- array( $fdate1, $fdate3 )));
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="GEO"></a><h3>3.2.23 GEO</h3>
- <p>
- This property specifies information related to the global position for the activity specified by
- <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components and is OPTIONAL and MUST NOT occur more than once.
- </p>
- <p>Value type for latitude and longitude is FLOAT.</p>
- <p class="quotes">Values for latitude and longitude shall be expressed as decimal
- fractions of degrees. Whole degrees of latitude shall be represented by
- a two-digit decimal number ranging from 0 through 90. Whole degrees
- of longitude shall be represented by a decimal number ranging from 0
- through 180. When a decimal fraction of a degree is specified, it shall
- be separated from the whole number of degrees by a decimal point.</p>
- <p>The output (float) latitude and longitude values are presented up to six decimals.</p>
- <p>Using the non-standard directive "GEOLOCATION" when calling iCalcreator
- <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
- getProperty method, iCalcreator returns output supporting<br>
- ISO6709 "Standard representation of geographic point location by coordinates"<br>
- by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
- (only if <a href="#GEO">GEO</a> is set).
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$GEO as used in code snippets is available.
- </p>
- <h5>Create GEO</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createGeo()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createGeo();
- </p>
- <h5>Delete GEO</h5>
- <p>Remove GEO from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "GEO" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$GEO );
- </p>
- <h5>Get GEO</h5>
- <p>If set, returns GEO property value (latitude/longitude) as prescribed in [RFC5545], otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "GEO" )</p>
- <p class="comment">output = array( "latitude" => <latitude>
- , "longitude" => <longitude>))</p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "GEO", false , true )</p>
- <p class="comment">output = array( "value" => array ( "latitude" => <latitude>
- , "longitude" => <longitude>))
- , "params" => xparams<sup>1</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $geo = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$GEO );
- </p>
- <h5>Set GEO</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "geo", latitude, longitude [, xparams ] )</p>
- <p class="comment">latitude = (float) latitude
- longitude = (float) longitude
- xparams<sup>1</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$GEO,
- 11.23456,
- -23.45678 );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="LAST-MODIFIED"></a><h3>3.2.24 LAST-MODIFIED</h3>
- <p>
- The property specifies the date and time that the information associated with the <strong>calendar</strong>
- component was last revised in the <strong>calendar</strong> store.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VTIMEZONE">VTIMEZONE</a> components.
- </p>
- <p>The value type for LAST-MODIFIED is <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME.</p>
- <p>For methods and formatting, explore the <a href="#CREATED">CREATED</a> property.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LAST_MODIFIED is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="LOCATION"></a><h3>3.2.25 LOCATION</h3>
- <p>
- The property defines the intended venue for the activity defined by a <strong>calendar</strong> component.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
- </p>
- <p>The value type for LOCATION is TEXT.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) LOCATION values.</p>
- <p>Using the non-standard directive "GEOLOCATION" when calling iCalcreator
- <a href="#geoLocation"><em>calendar</em></a> or <a href="#geoLocation_PROP">component</a>
- getProperty method, iCalcreator returns output supporting<br>
- ISO6709 "Standard representation of geographic point location by coordinates",<br>
- by combining the <a href="#LOCATION">LOCATION</a> and <a href="#GEO">GEO</a> property values
- (only if <a href="#GEO">GEO</a> is set).
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$LOCATION as used in code snippets is available.
- </p>
- <h5>Create LOCATION</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createLocation()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createLocation();
- </p>
- <h5>Delete LOCATION</h5>
- <p>Remove LOCATION from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "LOCATION" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$LOCATION );
- </p>
- <h5>Get LOCATION</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "LOCATION" )</p>
- <p class="comment">output = location<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "LOCATION", false , true )</p>
- <p class="comment">output = array( "value" => location<sup>1</sup>
- , "params" => param<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $location = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$LOCATION );
- </p>
- <h5>Set LOCATION</h5>
- <p>Insert property value.</p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "location", location [, param] )</p>
- <p class="comment">location<sup>1</sup> = (string) Value type TEXT
- params<sup>2</sup> = (array) (
- [ "ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$LOCATION,
- "Buckingham Palace" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="ORGANIZER"></a><h3>3.2.26 ORGANIZER</h3>
- <p>
- The property defines the organizer for a <strong>calendar</strong> component and is OPTIONAL
- and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
- <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
- </p>
- <p>This value type for ORGANIZER is URI, a <strong>calendar</strong> user address.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) ORGANIZER values.</p>
- <p>You can export <strong>calendar</strong> ORGANIZER values as <a href="#iCal2vCards">vCards</a>.
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$ORGANIZER as used in code snippets is available.
- </p>
- <h5>Create ORGANIZER</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createOrganizer()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createOrganizer();
- </p>
- <h5>Delete ORGANIZER</h5>
- <p>Remove ORGANIZER from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "ORGANIZER" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$ORGANIZER );
- </p>
- <h5>Get ORGANIZER</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "ORGANIZER" )</p>
- <p class="comment">output = organizer<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "ORGANIZER", false , true )</p>
- <p class="comment">output = array( "value" => organizer<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $organizer = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$ORGANIZER );
- </p>
- <h5>Set ORGANIZER</h5>
- <p>Insert property value.
- Property value must be prefixed by protocol (ftp://, http://,mailto:, file:// ref. rfc 1738), "mailto:" prefixed if missing.
- Also DIR parameter must be prefixed by protocol.
- SENT-BY parameter must use protocol "mailto:", prefixed if missing.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "organizer", organizer [, params] )</p>
- <p class="comment">organizer<sup>1</sup> = (string) a <strong>calendar</strong> user address (cal-address), a URI as defined by
- [RFC 1738] or any other IANA registered form for a URI.
- params<sup>2</sup> = (array) ( [ "LANGUAGE" => (string) "lang<sup>*</sup>" (applies to the CN parameter value) ]
- [, "CN" => (string) "common name to be associated with the
- <strong>calendar</strong> user specified by the property"]
- [, "DIR" => (string) "reference to a directory entry associated
- with the <strong>calendar</strong> user specified by the property" ]
- [, "SENT-BY" => (string) (cal-address, above)
- "single <strong>calendar</strong> user that is acting on behalf
- of the <strong>calendar</strong> user specified by the property" ]
- *[, xparams ]
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $dir = "ldap://domain.com:6666/o=3DDC%20Comp,c=3DUS??(cn=3DJohn%20Doe)";
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$ORGANIZER,
- "ical@domain.com",
- array( "CN" => "John Doe",
- "DIR" => $dir,
- "SENT-BY" => "secretary@domain.com",
- "X-Key1" => "X-Value1",
- "X-Key2" => "X-Value2" ));
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="PERCENT-COMPLETE"></a><h3>3.2.27 PERCENT-COMPLETE</h3>
- <p>
- This property is used by an assignee or delegatee of a <a href="#VTODO">VTODO</a> to
- convey the percent completion of a <a href="#VTODO">VTODO</a> to the Organizer and is
- OPTIONAL and MUST NOT occur more than once.
- </p>
- <p>
- The property value is a positive integer between zero and one hundred.
- A value of "0" indicates the <a href="#VTODO">VTODO</a> has not yet been started.
- A value of "100" indicates that the <a href="#VTODO">VTODO</a> has been completed.
- Integer values in between indicate the percent partially complete.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$PERCENT_COMPLETE as used in code snippets is available.
- </p>
- <h5>Create PERCENT-COMPLETE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createPercentComplete()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createPercentComplete();
- </p>
- <h5>Delete PERCENT-COMPLETE</h5>
- <p>Remove PERCENT-COMPLETE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "PERCENT-COMPLETE" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$PERCENT_COMPLETE )
- </p>
- <h5>Get PERCENT-COMPLETE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "PERCENT-COMPLETE" )</p>
- <p class="comment">output = percent<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "PRIORITY", false , true )</p>
- <p class="comment">output = array( "value" => percent<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $percent = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$PERCENT_COMPLETE );
- </p>
- <h5>Set PERCENT-COMPLETE</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "Percent-Complete", percent [, xparams ] )</p>
- <p class="comment">percent<sup>1</sup> = (int) Value type INTEGER
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$PERCENT_COMPLETE, 90 );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="PRIORITY"></a><h3>3.2.28 PRIORITY</h3>
- <p>
- The property defines the relative priority for a <strong>calendar</strong> component and is OPTIONAL
- and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
- </p>
- <p>
- The priority is specified as an integer in the range zero to nine.<br>
- A value of zero (US-ASCII decimal 48) specifies an undefined priority.<br>
- A value of one (US-ASCII decimal 49) is the highest priority.<br>
- A value of two (US-ASCII decimal 50) is the second highest priority.<br>
- Subsequent numbers specify a decreasing ordinal priority.<br>
- A value of nine (US-ASCII decimal 58) is the lowest priority.
- </p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) PRIORITY values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$PRIORITY as used in code snippets is available.
- </p>
- <h5>Create PRIORITY</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createPriority()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createPriority();
- </p>
- <h5>Delete PRIORITY</h5>
- <p>Remove PRIORITY from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "PRIORITY" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$PRIORITY );
- </p>
- <h5>Get PRIORITY</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "PRIORITY" )</p>
- <p class="comment">output = priority<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "PRIORITY", false , true )</p>
- <p class="comment">output = array( "value" => priority<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $priority = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$PRIORITY );
- </p>
- <h5>Set PRIORITY</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "priority", priority [, xparams ] )</p>
- <p class="comment">priority<sup>1</sup> = (int) Value type INTEGER
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$PRIORITY, 3 );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="RDATE"></a><h3>3.2.29 RDATE</h3>
- <p>
- This property defines the list of date/times for a recurrence set and is OPTIONAL and MAY occur
- more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a>,
- <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
- </p>
- <p>
- The default value type for RDATE is DATE-TIME, can be set to DATE or PERIOD (params<sup>2</sup>).
- In <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components, RDATE MUST be specified as a date-time value type with local time value.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$RDATE as used in code snippets is available.
- </p>
- <h5>Create RDATE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createRdate()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createRdate();
- </p>
- <h5>Delete RDATE</h5>
- <p>Remove RDATE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "RDATE" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) RDATE property.</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$RDATE );
- </p>
- <p class="label">Example 2</p>
- <p>Delete RDATE property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( "RDATE", 2 );</p>
- <p class="label">Example 3</p>
- <p>Delete all RDATE properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$RDATE ))
- continue;
- </p>
- <h5>Get RDATE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "RDATE" )</p>
- <p class="comment">output = dates<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "RDATE", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => dates<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "RDATE", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo RDATE</p>
- <p class="label">Example</p>
- <p class="example">
- $rdates = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$RDATE );
- </p>
- <h5>Set RDATE</h5>
- <p>Insert property value.</p>
- <p>The value type for RDATE should match the <a href="#DTSTART">DTSTART</a> value type.</p>
- <p>
- If DATE value type is set in params ("VALUE" = "DATE"), all timezone or offset in dates are ignored.<br>
- If no "VALUE" value type is set or if DATE-TIME value type or TZID value is set in params, DATE-TIME (default) value type is set.
- </p>
- <p>
- If "TZID" is set in params,
- all timezone or offset in dates are ignored (note timestamp, below) and DATE-TIME value type is set.<br>
- If empty params and offset in 1st date, all remaining (non-timestamp) dates are set to UTC.<br>
- If no "TZID" is set in params and timezone in 1st date, all remaining dates are within this timezone and param "TZID" is set.<br>
- If none of the above rules are applicable, DATE-TIME and local date is set default.
- </p>
- <p>
- Notice, use function <a href="#transformDateTime">transformDateTime</a> to convert a datetime from one time zone to another.
- </p>
- <p>RDATEs are automatically sorted in ascending order (Y-m-d[-H-i-s]).</p>
- <p>
- In spite of the fact that RDATE may contain a (comma separated) list of values,
- a strong recommendation is to split a RDATE "list" into multiple single RDATE entries.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "rdate", dates [, params [, propOrderNo ]] )</p>
- <p class="comment">dates<sup>1</sup> = (array) ( date2 *[, date2 ] )
- date2 = date / (array) ( startdate, enddate/duration )
- startdate = date
- enddate = date
- date = (array) ( (int) year
- , (int) month
- , (int) day
- [, (int) int hour
- , (int) min
- , (int) day
- , tz ] )
- date = (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec
- [, "tz" => tz ]] )
- // <span class="comment">output format</span>
- date = (array) ( "timestamp" => (int) timestamp [, "tz" => tz ] )
- // <span class="comment">timestamp without tz will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- date = (string) date/datetime string<sup>*</sup>
- tz = <timezone identifier> / offset
- // <span class="comment">timezone will be used as tzidparam, if tzidparam not set</span>
- offset = (int) (+/-)HHmm[ss] // <span class="comment">(arr/str) local date + UTC offset will result in a <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- duration = (array) ( (int) week/false
- [, (int) day/false
- , (int) hour
- , (int) min
- , (int) sec] )
- duration = (array) ([ "week" => (int) week / false ,] /
- [ "day" => (int) day / false
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ]] );
- // <span class="comment">output format, only used keys</span>
- duration = (array) ( "sec" => (int) sec );
- duration = (string) duration like "P15DT5H0M20S"
- params<sup>2</sup> = ([tzidparam ( / datetimeparam / dateparam / periodparam )] *[, xparams ] )
- tzidparam = kigkonsult\iCalcreator\util\util::$TZID => (string) <timezone identifier>
- // <span class="comment">output as local DATE-TIME with timezone identifier</span>
- // <span class="comment">if tzidparam="GMT"/"UTC" then</span>
- // <span class="comment">output date-time is suffixed by 'Z'</span>
- datetimeparam = "VALUE" => "DATE-TIME" // <span class="comment">default, output as DATE-TIME</span>
- dateparam = "VALUE" => "DATE" // <span class="comment">output as DATE</span>
- periodparam = "VALUE" => "PERIOD" // <span class="comment">output as PERIOD (datetime)</span>
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- <br>date/datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- trailing characters (digits), if exists, will be interpreted as offset/timezone
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example</p>
- See rules in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).<br>
- <p class="example">
- // $rdate1 = array ( 2001, 1, 1, 1, 1, 1 );
- // alt.
- $rdate1 = array( "year" => 2001,
- "month" => 1,
- "day" => 1,
- "hour" => 1,
- "min" => 1,
- "sec" => 1,
- "tz" => "GMT" );
- $rdate2 = array( 2002, 2, 2, 2, 2, 2, "GMT" );
- $rdate3 = "3 March 2003 03.03.03";
- $rdate4 = array( 2004, 4, 4, 4, 4, 4, "GMT" );
- $rdate5 = array( 2005, 10, 5, 5, 5, 5 );
- $rdate8 = array( "year" => 2007, "month" => 7, "day" => 7 );
- $rdur6 = array( "week" => 0,
- "day" => 0,
- "hour" => 5,
- "min" => 5,
- "sec" => 5 );
- $rdur7 = array( 0, 0, 6 );
- <span class="comment">// duration for 6 hours</span>
- $rdur8 = array( "week" => 8 );
- <span class="comment">// duration for 8 weeks</span>
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( $rdate1 ));
- <span class="comment">// one recurrence date, date in 7-params format (DATE-TIME)</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( $rdate1, $rdate2 ));
- <span class="comment">// two dates, date 7-params format (DATE-TIME)</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( array( $rdate1, $rdate2 ),
- array( $rdate3, $rdate4 )),
- array( "VALUE" => "PERIOD" ));
- <span class="comment">// Both fromdate and enddate must have 7 params (DATE-TIME) !!!</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( array( $rdate2, $rdur6 )),
- array( "VALUE" => "PERIOD" ));
- <span class="comment">// one duration (fromdate-duration)</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( array( $rdate1, $date2 ),
- array( $rdate3, $rdur7 )),
- array( "VALUE" => "PERIOD" ));
- <span class="comment">// period, pairs of fromdate+enddate and fromdate-duration</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RDATE,
- array( $rdate5, $date8 )),
- array( "VALUE" => "DATE" ));
- <span class="comment">// dates in DATE format</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="RECURRENCE-ID"></a><h3>3.2.30 RECURRENCE-ID</h3>
- <p>
- This property is used in conjunction with the <a href="#UID">UID</a> and <a href="#SEQUENCE">SEQUENCE</a>
- property to identify a specific instance of a recurring <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
- or <a href="#VJOURNAL">VJOURNAL</a> <strong>calendar</strong> component and is OPTIONAL and MAY NOT occur more than once.
- </p>
- <p>
- The property value is the effective value of the <a href="#DTSTART">DTSTART</a> property of the recurrence instance.
- The default value type is DATE-TIME, can be set to DATE (params<sup>2</sup>).
- </p>
- <p>For methods and formatting, explore the <a href="#DTEND">DTEND</a> property.</p>
- <p>
- The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use RECURRENCE-ID / <a href="#SEQUENCE">SEQUENCE</a> as
- sort parameters.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$RECURRENCE_ID is available.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="RELATED-TO"></a><h3>3.2.31 RELATED-TO</h3>
- <p>
- The property is used to represent a relationship or reference between one <strong>calendar</strong> component and another
- and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>
- The property value consists of the persistent, globally unique identifier of another <strong>calendar</strong> component.
- This value would be represented in a <strong>calendar</strong> component by the <a href="#UID">UID</a> property.
- </p>
- <p>
- The value type for RELATED-TO is TEXT.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$RELATED_TO as used in code snippets is available.
- </p>
- <h5>Create RELATED-TO</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createRelatedTo()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createRelatedTo();
- </p>
- <h5>Delete RELATED-TO</h5>
- <p>Remove RELATED-TO from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO )</p>
- <p class="label">Example 1</p>
- <p>Delete /single/first) RELATED-TO property</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO )</p>
- <p class="label">Example 2</p>
- <p>Delete RELATED-TO property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all RELATED-TO properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO ))
- continue;
- </p>
- <h5>Get RELATED-TO</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "RELATED-TO" )</p>
- <p class="comment">output = relid<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "RELATED-TO", propOrderNo/false , true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => relid<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "RELATED-TO", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo RELATED-TO</p>
- <p class="label">Example</p>
- <p class="example">
- $relatedId = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO );
- </p>
- <h5>Set RELATED-TO</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "Related-To", relid [, params [, propOrderNo ]] )</p>
- <p class="comment">relid<sup>1</sup> = (string) Value type TEXT.
- params<sup>2</sup> = (array) ( [ reltype ] *[, xparams] )
- reltype = "RELTYPE" => ("PARENT" (Default)
- / "CHILD"
- / "SIBLING"
- / (string) iana-token
- / (string) x-name )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$RELATED_TO,
- "19960401-080045-4000F192713@host.com");
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="REPEAT"></a><h3>3.2.32 REPEAT</h3>
- <p>
- This property defines the number of time the <a href="#VALARM">ALARM</a> should be repeated, after the initial trigger.
- If the <a href="#VALARM">ALARM</a> triggers more than once, then this property MUST be specified along with the <a href="#DURATION">DURATION</a> property.
- </p>
- <p>The value type for REPEAT is INTEGER.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$REPEAT as used in code snippets is available.
- </p>
- <h5>Create REPEAT</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createRepeat()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createRepeat();
- </p>
- <h5>Delete REPEAT</h5>
- <p>Remove REPEAT from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "REPEAT" )</p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$REPEAT );
- </p>
- <h5>Get REPEAT</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "REPEAT" )</p>
- <p class="comment">output = repeatTimes<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "REPEAT", false , true )</p>
- <p class="comment">output = array( "value" => repeatTimes<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $repeat = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$REPEAT );
- </p>
- <h5>Set REPEAT</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "repeat", repeatTimes [, xparams ] )</p>
- <p class="comment">repeatTimes<sup>1</sup> = (int) Value type INTEGER
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$REPEAT, 2 );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="REQUEST-STATUS"></a><h3>3.2.33 REQUEST-STATUS</h3>
- <p>
- This property defines the status code returned for a scheduling request and is OPTIONAL and
- MAY occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
- </p>
- <p>The value type for REQUEST-STATUS is TEXT and consists of</p>
- <dl>
- <dt>a short return status component,
- <dd>(in output) a PERIOD character separated 3-tuple of integers, ex 3.11
- <dt>a longer return status description component
- <dt>optionally a statusspecific data component
- </dl>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$REQUEST_STATUS as used in code snippets is available.
- </p>
- <h5>Create REQUEST-STATUS</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createRequestStatus()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createRequestStatus();
- </p>
- <h5>Delete REQUEST-STATUS</h5>
- <p>Remove REQUEST-STATUS from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "REQUEST-STATUS" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) REQUEST-STATUS property.</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$REQUEST_STATUS );
- </p>
- <p class="label">Example 2</p>
- <p>Delete REQUEST-STATUS property no 2.</p>
- <p class="example">
- $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$REQUEST_STATUS, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all REQUEST-STATUS properties.</p>
- <p class="example">
- while( $vjournal->deleteProperty( kigkonsult\iCalcreator\util\util::$REQUEST_STATUS ))
- continue;
- </p>
- <h5>Get REQUEST-STATUS</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "REQUEST-STATUS" )</p>
- <p class="comment">output = array( "statcode" => statcode<sup>1</sup>
- , "text" => errtext<sup>2</sup>
- [ , "extdata" => extraData<sup>3</sup> ] )</p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "REQUEST-STATUS", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => array( "statcode" => statcode<sup>1</sup>
- , "text" => errtext<sup>2</sup>
- [ , "extdata" => extraData<sup>3</sup> ] )
- , "params" => params<sup>4</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "REQUEST-STATUS", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo REQUEST-STATUS</p>
- <p class="label">Example</p>
- <p class="example">
- $requestStatus = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$REQUEST_STATUS );
- </p>
- <h5>Set REQUEST-STATUS</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "Request-Status"
- , statcode, errtext [,extraData/false [,params [,propOrderNo]]])</p>
- <p class="comment">statcode<sup>1</sup> = (int) Hierarchical, numeric return status code
- (1*DIGIT "." 1*DIGIT 1*DIGIT)
- errtext<sup>2</sup> = (string) Textual status description
- extraData<sup>3</sup> = (string) Textual exception data.
- For example, the offending property name and value
- or complete property line.
- params<sup>4</sup> = (array) ( ["LANGUAGE" => (string) "lang<sup>*</sup>"] *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vfreebusy->setProperty(kigkonsult\iCalcreator\util\util::$REQUEST_STATUS,
- 2.00,
- "Invalid property value",
- "DTSTART:96-Apr-31");
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="RESOURCES"></a><h3>3.2.34 RESOURCES</h3>
- <p>
- This property defines the equipment or resources anticipated for an activity specified by a <strong>calendar</strong> entity
- and is OPTIONAL and MAY occur more than once in <a href="#VEVENT">VEVENT</a> and <a href="#VTODO">VTODO</a> components.
- </p>
- <p>The value type for RESOURCES is TEXT.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) RESOURCES values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$RESOURCES as used in code snippets is available.
- </p>
- <h5>Create RESOURCES</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createResources()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createResources();
- </p>
- <h5>Delete RESOURCES</h5>
- <p>Remove RESOURCES from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "RESOURCES" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) RESOURCES property.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RESOURCES );
- </p>
- <p class="label">Example 2</p>
- <p>Delete RESOURCES property no 2.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RESOURCES, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Delete all RESOURCES properties.<p>
- <p class="example">
- while( $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RESOURCES ))
- continue;
- </p>
- <h5>Get RESOURCES</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "RESOURCES" )</p>
- <p class="comment">output = resources<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "RESOURCES", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => resources<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "RESOURCES", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo RESOURCES</p>
- <p class="label">Example</p>
- <p class="example">
- $resources = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$RESOURCES );
- </p>
- <h5>Set RESOURCES</h5>
- <p>Insert property value.</p>
- <p>
- In spite of the fact that RESOURCES may contain a (comma separated) list of values,
- a strong recommendation is to split a RESOURCES "list" into multiple single RESOURCES entries.
- </p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "resources", resources [, params [, propOrderNo ]] )</p>
- <p class="comment">resources<sup>1</sup> = (string) resource / (array) ( *resource )
- resource = (string) textual resources or subtypes of the <strong>calendar</strong> component,
- can be specified as a list of resources
- separated by the COMMA character.
- params<sup>2</sup> = (array) (
- [ "ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$RESOURCES,
- "COMPUTER PROJECTOR" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="RRULE"></a><h3>3.2.35 RRULE</h3>
- <p>
- This property defines a rule or repeating pattern for recurring <a href="#VEVENT">EVENTs</a>, <a href="#VTODO">TODOs</a>,
- <a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> definitions and is OPTIONAL and MAY occur more than once ([RFC2445]),
- SHOULD NOT occur more than once ([RFC5545]).
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$RRULE as used in code snippets is available.
- </p>
- <h5>Create RRULE</h5>
- <p>If set, returns iCal formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createRrule()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createRrule();
- </p>
- <h5>Delete RRULE</h5>
- <p>Remove RRULE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "RRULE" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) RRULE property.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RRULE );
- </p>
- <p class="label">Example 2</p>
- <p>Delete RRULE property no 2.</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RRULE, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Delete all RRULE properties.</p>
- <p class="example">
- while( $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$RRULE ))
- continue;
- </p>
- <h5>Get RRULE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "RRULE" )</p>
- <p class="comment">output = recur<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "RRULE", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => recur<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( "RRULE", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo RRULE</p>
- <p class="label">Example</p>
- <p class="example">
- $rrules = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$RRULE );
- </p>
- <h5>Set RRULE</h5>
- <p>Insert property value.</p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "rrule", recur [, xparams [, propOrderNo ]] )</p>
- <p>
- For rules example see <a href="#EXRULE">Exrule</a> format and in detail in <a href="http://kigkonsult.se/downloads/dl.php?f=rfc2445" title="RFC2445" target="_blank">RFC2445</a> - Internet Calendaring and Scheduling Core Object Specification (iCalendar).
- </p>
- <p class="comment">recur<sup>1</sup> = see <a href="#EXRULE">Exrule</a>
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="SEQUENCE"></a><h3>3.2.36 SEQUENCE</h3>
- <p>
- This property defines the revision sequence number of the <strong>calendar</strong> component within a sequence of revisions.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a> and <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p class="quotes">
- It is monotonically incremented by the <a href="#ORGANIZER">ORGANIZER's</a> CUA (Calendar
- User Agent) each time the <a href="#ORGANIZER">ORGANIZER</a> makes a significant revision
- to the <strong>calendar</strong> component.
- <br><br>
- When the <a href="#ORGANIZER">ORGANIZER</a> makes changes to one of the following
- properties, the sequence number MUST be incremented: <a href="#DTSTART">DTSTART</a>,
- <a href="#DTEND">DTEND</a>, <a href="#DUE">DUE</a>, <a href="#RDATE">RDATE</a>, <a href="#RRULE">RRULE</a>,
- <a href="#EXDATE">EXDATE</a>, <a href="#EXRULE">EXRULE</a>, <a href="#STATUS">STATUS</a>. In addition,
- changes made by the <a href="#ORGANIZER">ORGANIZER</a> to other properties can also force
- the sequence number to be incremented. The <a href="#ORGANIZER">ORGANIZER</a> CUA MUST
- increment the sequence number when ever it makes changes to
- properties in the <strong>calendar</strong> component that the <a href="#ORGANIZER">ORGANIZER</a>
- deems will jeopardize the validity of the participation status of the
- <a href="#ATTENDEE">Attendees</a>. For example, changing the location
- of a meeting from one locale to another distant locale could
- effectively impact the participation status of the <a href="#ATTENDEE">Attendees</a>.
- </p>
- <p>The value type of SEQUENCE is INTEGER.</p>
- <p>The calendar method <a href="#sort2">SORT</a> with argument <a href="#UID">UID</a> also use <a href="#RECURRENCE-ID">RECURRENCE-ID</a> / SEQUENCE as
- sort parameters.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$SEQUENCE as used in code snippets is available.
- </p>
- <h5>Create SEQUENCE</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createSequence()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createSequence();
- </p>
- <h5>Delete SEQUENCE</h5>
- <p>Remove SEQUENCE from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "SEQUENCE" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$SEQUENCE );
- </p>
- <h5>Get SEQUENCE</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "SEQUENCE" )</p>
- <p class="comment">output = sequence<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "SEQUENCE", false , true )</p>
- <p class="comment">output = array( "value" => sequence<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $sequence = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$SEQUENCE );
- </p>
- <h5>Set SEQUENCE</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "sequence" [, sequence [, xparams ]] )</p>
- <p class="comment">sequence<sup>1</sup> = (int) Value type INTEGER
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example 1</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$SEQUENCE, 2 );
- <span class="comment">// set sequence number to 2</span>
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$SEQUENCE );
- <span class="comment">// force sequence number to be set to 0
- // or, if sequence exists, incremented by 1</span>
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="STATUS"></a><h3>3.2.37 STATUS</h3>
- <p>
- This property defines the overall status or confirmation for the <strong>calendar</strong> component.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
- and <a href="#VJOURNAL">VJOURNAL</a> components.
- </p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) STATUS values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$STATUS as used in code snippets is available.
- </p>
- <h5>Create STATUS</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createStatus()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createStatus();
- </p>
- <h5>Delete STATUS</h5>
- <p>Remove STATUS from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "STATUS" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->deleteProperty( kigkonsult\iCalcreator\util\util::$STATUS );
- </p>
- <h5>Get STATUS</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "STATUS" )</p>
- <p class="comment">output = status<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "STATUS", false , true )</p>
- <p class="comment">output = array( "value" => status<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $status = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$STATUS );
- </p>
- <h5>Set STATUS</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "status", status [, xparams ] )</p>
- <p class="comment"> // <span class="comment">Status values for a <a href="#vevent">VEVENT</a></span>
- status<sup>1</sup> = "TENTATIVE" // <span class="comment">Indicates event is tentative</span>
- / "CONFIRMED" // <span class="comment">Indicates event is definite</span>
- / "CANCELLED" // <span class="comment">Indicates event was cancelled</span>
- // <span class="comment">Status values for <a href="#VTODO">VTODO</a></span>
- status<sup>1</sup> = "NEEDS-ACTION" // <span class="comment">Indicates to-do needs action</span>
- / "COMPLETED" // <span class="comment">Indicates to-do completed</span>
- / "IN-PROCESS" // <span class="comment">Indicates to-do in process of</span>
- / "CANCELLED" // <span class="comment">Indicates to-do was cancelled</span>
- // <span class="commsnt">Status values for <a href="#VJOURNAL">VJOURNAL</a></span>
- status<sup>1</sup> = "DRAFT" // <span class="comment">Indicates journal is draft</span>
- / "FINAL" // <span class="comment">Indicates journal is final</span>
- / "CANCELLED" // <span class="comment">Indicates journal is removed</span>
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$STATUS, "COMPLETED" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="SUMMARY"></a><h3>3.2.38 SUMMARY</h3>
- <p>
- This property defines a short ("one line") summary or subject for the <strong>calendar</strong> component.
- (In "[RFC5545], Recommended Practices", up to 255 characters) (, analogous to a mail SUBJECT).
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>
- and <a href="#VJOURNAL">VJOURNAL</a> components. The property is REQUIRED and MUST occur once in
- <a href="#VALARM">VALARM</a> (EMAIL) <strong>calendar</strong> component.
- </p>
- <p>The value type for SUMMARY is TEXT.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) SUMMARY values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$SUMMARY as used in code snippets is available.
- </p>
- <h5>Create SUMMARY</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createSummary()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createSummary();
- </p>
- <h5>Delete SUMMARY</h5>
- <p>Remove SUMMARY from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "SUMMARY" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$SUMMARY );
- </p>
- <h5>Get SUMMARY</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "SUMMARY" )</p>
- <p class="comment">output = summary<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "SUMMARY", false , true )</p>
- <p class="comment">output = array( "value" => summary<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $summary = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$SUMMARY );
- </p>
- <h5>Set SUMMARY</h5>
- <p>Insert property value.</p>
- <p>Parameters will be ordered as prescribed in [RFC5545].</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "summary", summary [, params ] )</p>
- <p CLASS="comment">summary<sup>1</sup> = (string) Value type TEXT,
- a short, one line summary about the activity or journal entry.
- params<sup>2</sup> = array( ["ALTREP" => (string) "<an alternate text representation, URI>"]
- [, "LANGUAGE" => (string) "lang<sup>*</sup>"]
- *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$SUMMARY, "This is a summary" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TRANSP"></a><h3>3.2.39 TRANSP</h3>
- <p>
- This property defines whether an <a href="#VEVENT">EVENT</a> is transparent or not to busy time searches and is OPTIONAL and MUST NOT occur more than once.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TRANSP as used in code snippets is available.
- </p>
- <h5>Create TRANSP</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createTransp()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTransp();
- </p>
- <h5>Delete TRANSP</h5>
- <p>Remove TRANSP from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "TRANSP" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$TRANSP );
- </p>
- <h5>Get TRANSP</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "TRANSP" )</p>
- <p class="comment">output = transp<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "TRANSP", false , true )</p>
- <p class="comment">output = array( "value" => transp<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $transp = $vtodo->getProperty( kigkonsult\iCalcreator\util\util::$TRANSP );
- </p>
- <h5>Set TRANSP</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "transp", transp [, xparams ] )</p>
- <p class="comment">transp<sup>1</sup> = "OPAQUE" / "TRANSPARENT"
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$TRANSP, "TRANSPARENT" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TRIGGER"></a><h3>3.2.40 TRIGGER</h3>
- <p>
- This property specifies when an <a href="#VALARM">ALARM</a> will trigger and is REQUIRED and MUST NOT occur more than once.
- </p>
- <p>
- The default value type is DURATION. The value type can be set to a DATE-TIME value type,
- in which case the value MUST specify an <a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME value.
- </p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TRIGGER as used in code snippets is available.
- </p>
- <h5>Create TRIGGER</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">valarm::createTrigger()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTrigger();
- </p>
- <h5>Delete TRIGGER</h5>
- <p>Remove TRIGGER from component.</p>
- <p class="label">Format</p>
- <p class="format">valarm::deleteProperty( "TRIGGER" )</p>
- <p class="label">Example</p>
- <p class="example">
- $valarm->deleteProperty( kigkonsult\iCalcreator\util\util::$TRIGGER );
- </p>
- <h5>Get TRIGGER</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">valarm::getProperty( "TRIGGER" )</p>
- <p class="comment">output = duration/date</p>
- <p class="label">Format 2</p>
- <p class="format">valarm::getProperty( "TRIGGER", false , true )</p>
- <p class="comment">output = array( "value" => duration<sup>1</sup>/date<sup>3</sup> )
- , "params" => params<sup>4</sup> )
- <p class="label">Example</p>
- <p class="example">
- $trigger = $valarm->getProperty( kigkonsult\iCalcreator\util\util::$TRIGGER );
- </p>
- <h5>Set TRIGGER</h5>
- <p>Insert property value.</p>
- <p>Note, use function <a href="#transformDateTime">transformDateTime</a> to change a (local) datetime to UTC time zone.</p>
- <p class="label">Format 1</p>
- <p class="format">valarm::setProperty( "trigger", duration<sup>1</sup> [, params<sup>4</sup> ] )</p>
- <p class="label">Format 2</p>
- <p class="format">valarm::setProperty( "trigger", duration<sup>2</sup> [, params<sup>4</sup> ] )</p>
- <p class="label">Format 3</p>
- <p class="format">valqarm::setProperty( "trigger", date<sup>3</sup> [, params<sup>4</sup> ] )</p>
- <p class="label">Format</p>
- <p class="format">valarm::setProperty( "trigger", (int) year / null
- , (int) month / null
- , (int) day / null
- [, (int) week / null
- [, (int) hour / null
- , (int) min / null
- , (int) sec / null
- [, relatedStart
- [, before
- [, params<sup>4</sup> ]]]]] )</p>
- <p class="comment">duration<sup>1</sup> = (array) ( "week" => (int) week
- , "relatedStart" => relatedStart
- , "before" => before )
- duration<sup>1</sup> = (array) ( "day" => (int) day
- , "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec
- , "relatedStart" => relatedStart
- , "before" => before )
- relatedStart = (bool) true : related start (default),
- false : related end
- before = (booL) true : before relatedStart (default),
- false : after relatedStart
- duration<sup>2</sup> = (string) dur-value = (["+"]/"-")"P"(dur-date/dur-time/dur-week)
- dur-date = dur-day [dur-time]
- dur-time = "T" (dur-hour / dur-minute / dur-second)
- dur-week = 1*DIGIT "W"
- dur-day = 1*DIGIT "D"
- dur-hour = 1*DIGIT "H" [dur-minute]
- dur-minute = 1*DIGIT "M" [dur-second]
- dur-second = 1*DIGIT "S"
- date<sup>3</sup> = (array) ( "year" => (int) year // <span class="comment"><a href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ])
- date<sup>3</sup> = (array) ( "timestamp" => (int) timestamp ) // <span class="comment"><a class="ref" href="#DATE_WITH_UTC_TIME">UTC</a> DATE-TIME</span>
- date<sup>3</sup> = (string) datetime string<sup>*</sup>
- params<sup>4</sup> = (array) ( [[ reltype [, trigRelparam ]] / datetimeparam ] *[, xparams ] )
- reltyp = "RELATED" => "START" (default) / "END"
- trigRelparam = "VALUE" => "DURATION"
- datetimeparam= "VALUE" => "DATE-TIME" // <span class="comment">mandatory if DATE-TIME</span>
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- <br>datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example 1</p>
- <p>A duration, 1 hour 2 min 3 sec, before start</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- null, null, null, null, 1, 2, 3 );
- </p>
- <p class="label">Example 2</p>
- <p>A duration, 1 hour 2 min 3 sec, before start</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- array ("hour"=>1,"min"=>2,"sec"=>3 );
- </p>
- <p class="label">Example 3</p>
- <p>A duration, 1 hour 2 min 3 sec, before start</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- "PT1H2M3S" );
- </p>
- <p class="label">Example 4</p>
- <p>A duration, 1 week before start.</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- null, null, null, 1 );
- </p>
- <p class="label">Example 5</p>
- <p>A duration, 1 week after end.</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- array ( "week" => 1,
- "relatedStart" => false,
- "before" => false ));
- </p>
- <p class="label">Example 6</p>
- <p>A duration, 1 week after end.</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- "P1W",
- array( "related" => "END" ));
- </p>
- <p class="label">Example 7</p>
- <p class="example">
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- array( "year" => 2007,
- "month" => 6,
- "day" => 5,
- "hour" => 2,
- "min" => 2,
- "sec" => 3 ),
- array( "VALUE" => "DATE-TIME" ));
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TZID"></a><h3>3.2.41 TZID</h3>
- <p>
- This property specifies the text value that uniquely identifies the <a href="#VTIMEZONE">VTIMEZONE</a>
- <strong>calendar</strong> component and is REQUIRED, but MUST NOT occur more than once.
- </p>
- <p>The value type for TZID is TEXT.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TZID as used in code snippets is available.
- </p>
- <h5>Create TZID</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::createTzid()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTzid();
- </p>
- <h5>Delete TZID</h5>
- <p>Remove TZID from component.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::deleteProperty( kigkonsult\iCalcreator\util\util::$TZID )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtimezone->deleteProperty( kigkonsult\iCalcreator\util\util::$TZID );
- </p>
- <h5>Get TZID</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">vtimezone::getProperty( kigkonsult\iCalcreator\util\util::$TZID )</p>
- <p class="comment">output = tzid<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">vtimezone::getProperty( kigkonsult\iCalcreator\util\util::$TZID, false , true )</p>
- <p class="comment">output = array( "value" => tzid<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $tzid = $vtimezone->getProperty( kigkonsult\iCalcreator\util\util::$TZID );
- </p>
- <h5>Set TZID</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::setProperty( "tzid", tzid [, xparams ] )</p>
- <p class="comment">tzid<sup>1</sup> = (string) Value type TEXT
- xparams<sup>2</sup> = (array)( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZID,
- "US-Eastern" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TZNAME"></a><h3>3.2.42 TZNAME</h3>
- <p>
- This property specifies the customary designation for a <a href="#VTIMEZONE">STANDARD</a> or <a href="#VTIMEZONE">DAYLIGHT</a> description
- and is OPTIONAL and MAY occur more than once.
- </p>
- <p>The value type for TZNAME is TEXT.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TZNAME as used in code snippets is available.
- </p>
- <h5>Create TZNAME</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::createTzname()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTzname();
- </p>
- <h5>Delete TZNAME</h5>
- <p>Remove TZNAME from component.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::deleteProperty( "TZNAME" )</p>
- <p class="label">Example 1</p>
- <p>Delete (single/first) TZNAME property.</p>
- <p class="example">
- $vtimezonestd->deleteProperty( kigkonsult\iCalcreator\util\util::$TZNAME );
- </p>
- <p class="label">Example 2</p>
- <p>Delete TZNAME property no 2.</p>
- <p class="example">
- $vtimezonestd->deleteProperty( kigkonsult\iCalcreator\util\util::$TZNAME, 2 );
- </p>
- <p class="label">Example 3</p>
- <p>Deleting all TZNAME properties.</p>
- <p class="example">
- while( $vtimezonestd->deleteProperty( kigkonsult\iCalcreator\util\util::$TZNAME ))
- continue;
- </p>
- <h5>Get TZNAME</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">vtimezone::getProperty( "TZNAME" )</p>
- <p class="comment">output = tzname<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">vtimezone::getProperty( "TZNAME", propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( "value" => tzname<sup>1</sup>
- , "params" => params<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">vtimezone::getProperty( "TZNAME", propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo TZNAME</p>
- <p class="label">Example</p>
- <p class="example">
- $tzname = $timezonestandard->getProperty( kigkonsult\iCalcreator\util\util::$TZNAME );
- </p>
- <h5>Set TZNAME</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::setProperty( "tzname", tzname [, params [, propOrderNo ]] )</p>
- <p class="comment">tzname<sup>1</sup> = (string) Value type TEXT
- params<sup>2</sup> = (array) ( [ "LANGUAGE" => (string) "lang<sup>*</sup>" ] *[, xparams ] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- propOrderNo = (int) order number // <span class="comment">1=1st, 2=2nd etc</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZID,
- "US-Eastern" );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$LAST_MODIFIED,
- "19870101" );
- $standard = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCSTANDARD );
- $standard->setProperty( kigkonsult\iCalcreator\util\util::$TZNAME,
- "EST" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TZOFFSETFROM"></a><h3>3.2.43 TZOFFSETFROM</h3>
- <p>
- This property specifies the offset which is in use prior to this <a href="#VTIMEZONE">TIMEZONE</a> observance.
- The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
- </p>
- <p>The value type is UTC-OFFSET, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TZOFFSETFROM as used in code snippets is available.
- </p>
- <h5>Create TZOFFSETFROM</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::createTzoffsetfrom()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTzoffsetfrom();
- </p>
- <h5>Delete TZOFFSETFROM</h5>
- <p>Remove TZOFFSETFROM from component.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::deleteProperty( "TZOFFSETFROM" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtimezonestd->deleteProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETFROM );
- </p>
- <h5>Get TZOFFSETFROM</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">vtimezone::getProperty( "TZOFFSETFROM" )</p>
- <p class="comment">output = tzoffsetfrom<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">vtimezone::getProperty( "TZOFFSETFROM", false , true )</p>
- <p class="comment">output = array( "value" => tzoffsetfrom<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $tzoffsetfrom = $tzstandard->getProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETFROM );
- </p>
- <h5>Set TZOFFSETFROM</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::setProperty( "tzoffsetfrom", tzoffsetfrom [, xparams ] )</p>
- <p class="comment">tzoffsetfrom<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
- xparams<sup>2</sup> = (array) ( *[ /string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZID,
- "US-Eastern" );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$LAST_MODIFIED,
- "19870101" );
- $standard = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCSTANDARD );
- $standard->setProperty( kigkonsult\iCalcreator\util\util::$TZNAME,
- "EST" );
- $standard->setProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETFROM,
- "-0500" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TZOFFSETTO"></a><h3>3.2.44 TZOFFSETTO</h3>
- <p>
- This property specifies the offset which is in use in this <a href="#VTIMEZONE">TIMEZONE</a> observance.
- The property is REQUIRED, but MUST NOT occur more than once in <a href="#VTIMEZONE">STANDARD</a> and <a href="#VTIMEZONE">DAYLIGHT</a> components.
- </p>
- <p>The value type is UTC-OFFSET, "+" / "-" time-hour (2*DIGIT) time-minute (2*DIGIT) [time-second (2*DIGIT)].</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TZOFFSETTO as used in code snippets is available.
- </p>
- <h5>Create TZOFFSETTO</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::createTzoffsetto()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTzoffsetto();
- </p>
- <h5>Delete TZOFFSETTO</h5>
- <p>Remove TZOFFSETTO from component.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::deleteProperty( "TZOFFSETTO" )</p>
- <p class="label">Example</p>
- <p class="example">
- $daylight->deleteProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETTO );
- </p>
- <h5>Get TZOFFSETTO</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">vtimezone::getProperty( "TZOFFSETTO" )</p>
- <p class="comment">output = tzoffsetto<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">vtimezone::getProperty( "TZOFFSETTO", false , true )</p>
- <p class="comment">output = array( "value" => tzoffsetto<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $tzoffsetto = $tztandard->getProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETTO );
- </p>
- <h5>Set TZOFFSETTO</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::setProperty( "tzoffsetto", tzoffsetto [, xparams ] )</p>
- <p class="comment">tzoffsetto<sup>1</sup> = (int) (+/-)HHmm[ss] // <span class="comment">UTC offset</span>
- xparams<sup>2</sup> = array( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZID,
- "US-Eastern" );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$LAST_MODIFIED,
- "19870101" );
- $standard = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCSTANDARD );
- .. .
- $daylight = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCDAYLIGHT );
- $daylight->setProperty( kigkonsult\iCalcreator\util\util::$TZOFFSETTO,
- "1345" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="TZURL"></a><h3>3.2.45 TZURL</h3>
- <p>
- The TZURL provides a means for a <a href="#VTIMEZONE">VTIMEZONE</a> component to point to
- a network location that can be used to retrieve an up-to-date version of itself. The property
- is OPTIONAL and MUST NOT occur more than once.
- </p>
- <p> The value type is URI.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$TZURL as used in code snippets is available.
- </p>
- <h5>Create TZURL</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::createTzurl()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createTzurl();
- </p>
- <h5>Delete TZURL</h5>
- <p>Remove TZURL from component.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::deleteProperty( "TZURL" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vtimezone->deleteProperty( kigkonsult\iCalcreator\util\util::$TZURL );
- </p>
- <h5>Get TZURL</h5>
- <p>If set, returns property value, otherwise bool false.</p>.
- <p class="label">Format 1</p>
- <p class="format">vtimezone::getProperty( "TZURL" )</p>
- <p class="comment">output = tzurl<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">vtimezone::getProperty( "TZURL", false , true )</p>
- <p class="comment">output = array( "value" => tzurl<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $tzurl = $timezonestandard->getProperty( kigkonsult\iCalcreator\util\util::$TZURL );
- </p>
- <h5>Set TZURL</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">vtimezone::setProperty( "tzurl", tzurl [, xparams ] )</p>
- <p class="comment">tzurl<sup>1</sup> = (string) Value type URI
- xparams<sup>2</sup> = array( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $tz = "http://zones.stds_r_us.net/tz/US-Eastern" );
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZID,
- "US-Eastern" );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$LAST_MODIFIED,
- "19870101T000000" );
- $vtimezone->setProperty( kigkonsult\iCalcreator\util\util::$TZURL,
- $tz );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="UID"></a><h3>3.2.46 UID</h3>
- <p>
- The persistent, globally <b>U</b>nique <b>ID</b>entifier for the <strong>calendar</strong> component.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>, <a href="#VTODO">VTODO</a>,
- <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.<br>
- However, UID is <b>AUTOMATICALLY</b> generated in iCalcreator and configuration <a href="#Unique_id">unique_id</a>
- is used when auto-creating component UID.
- </p>
- <p>UID generated format :</p>
- <p class="format">date("Ymd\THisT") . "-" . [microSec][random] . "@" . <a href="#Unique_id">unique_id</a></p>
- <p>
- microSec = microseconds, 4 pos<br>
- random = 6 characters aA-zZ, 0-9
- </p>
- <p class="label">Example</p>
- <p class="example">"20070803T194810CEST-0123U3PXiX@kigkonsult.se"</p>
- <p>
- UID may be required when importing iCal files into some <strong>calendar</strong> software (MS etc.),
- as well as (<strong>calendar</strong>) properties <a href="#X-PROPERTY">x-properties</a> "X-WR-CALNAME", "X-WR-CALDESC" and "X-WR-TIMEZONE",
- <a href="#METHOD">METHOD</a> (value PUBLISH etc.) and the (also automatically created) <a href="#DTSTAMP">DTSTAMP</a> property.
- </p>
- <p>The value type for UID is TEXT.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$UID as used in code snippets is available.
- </p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) UID values.</p>
- <h5>Create UID</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createUid()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createUid();
- </p>
- <h5>Delete UID</h5>
- <p>
- If UID is remove from a component, UID will automatically be recreated when iCalcreator object output methods
- like <a href="#createCalendar">createCalendar</a>, <a href="#returnCalendar">returnCalendar</a>
- or <a href="#saveCalendar">saveCalendar</a> is executed.
- </p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "UID" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$UID );
- </p>
- <h5>Get UID</h5>
- <p>If set, returns property, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "UID" )</p>
- <p class="comment">output = uid<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "UID", false , true )</p>
- <p class="comment">output = array( "value" => uid<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $uid = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$UID );
- </p>
- <h5>Set UID</h5>
- <p>Insert property value, overrides any previously set or auto-created UID.</p>
- <p>
- Do <b>NOT</b> use an integer UID or only a component name in UID (ex. "vevent"),
- this may cause malfunction in iCalcreator object method <a href="#setComponent">setComponent</a> with index or UID argument.
- </p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "uid", uid [, xparams ] )</p>
- <p class="comment">uid<sup>1</sup> = (string) Value type TEXT
- xparams<sup>2</sup> = array( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$UID,
- "20070803T194810CEST-0123U3PXiX@kigkonsult.se");
- </p>
- <p>
- BUT, due to poorly created iCal media files, a numeric UID is accepted in the setProperty( UID ) and <a href="#parse_merge">parse()</a> methods.
- Do check for component digit UIDs and remove it (will force a (auto) UID recreation) or (re-)set it manually.
- </p>
- <p class="example">
- if( ctype_digit( $vevent->getProperty( kigkonsult\iCalcreator\util\util::$UID )))
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$UID );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="URL"></a><h3>3.2.47 URL</h3>
- <p>
- This property defines a Uniform Resource Locator (URL) associated with the <strong>iCalendar</strong> object.
- The property is OPTIONAL and MUST NOT occur more than once in <a href="#VEVENT">VEVENT</a>,
- <a href="#VTODO">VTODO</a>, <a href="#VJOURNAL">VJOURNAL</a> and <a href="#VFREEBUSY">VFREEBUSY</a> components.
- </p>
- <p> The value type is URI.</p>
- <p>You can <a href="#sort2">SORT</a> <strong>calendar</strong> (components) on (asc) URL values.</p>
- <p>
- To ease up usage, kigkonsult\iCalcreator\util\util::$URL as used in code snippets is available.
- </p>
- <h5>Create URL</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createUrl()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createUrl();
- </p>
- <h5>Delete URL</h5>
- <p>Remove URL from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "URL" )</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->deleteProperty( kigkonsult\iCalcreator\util\util::$URL );
- </p>
- <h5>Get URL</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "URL" )</p>
- <p class="comment">output = url<sup>1</sup></p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty( "URL", false , true )</p>
- <p class="comment">output = array "value" => url<sup>1</sup>
- , "params" => xparams<sup>2</sup> )</p>
- <p class="label">Example</p>
- <p class="example">
- $url = $vevent->getProperty( kigkonsult\iCalcreator\util\util::$URL );
- </p>
- <h5>Set URL</h5>
- <p>Insert property value.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( "url", url [, xparams ] )</p>
- <p class="comment">url<sup>1</sup> = (string) Value type URI
- xparams<sup>2</sup> = (array) ( *[ (string) key => (string) value ] ) // <span class="comment">key prefix "X-"</span>
- </p>
- <p class="label">Example</p>
- <p class="example">
- $vtodo->setProperty( kigkonsult\iCalcreator\util\util::$URL,
- "http://www.icaldomain.net" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a name="X-PROPERTY_PROP"></a><h3>3.2.48 X-PROPERTY</h3>
- <p>
- A component, non-standard property with a TEXT value and a name with an "<b>X-</b>" prefix. In a component,
- an x-property, with an unique name, can occur only once but the number of x-properties are unlimited.
- </p>
- <p>The value type is TEXT.</p>
- <h5>Create X-PROPERTY</h5>
- <p>If set, returns [RFC5545] formatted string, otherwise null.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::createXprop()</p>
- <p class="label">Example</p>
- <p class="example">
- $str = $component->createxProp();
- </p>
- <h5>Delete X-PROPERTY</h5>
- <p>Remove X-PROPERTY from component.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteProperty( "<X-PROPERTY>" )</p>
- <p class="label">Example 1</p>
- <p>Deleting x-property named "X-PROPERTY".</p>
- <p class="example">
- $vevent->deleteProperty( "X-PROPERTY" );
- </p>
- <p class="label">Example 2</p>
- <p>Deleting all x-properties.</p>
- <p class="example">
- while( $vevent->deleteProperty())
- continue;
- </p>
- <h5>Get X-property</h5>
- <p>If set, returns property value, otherwise bool false.</p>
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getProperty( "<X-PROPERTY>" )</p>
- <p class="comment">output = array( propertyName<sup>1</sup>
- , propertyData<sup>2</sup> )</p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getProperty()</p>
- <p class="comment">output = array( propertyName<sup>1</sup>
- , propertyData<sup>2</sup> )</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getProperty( false, propOrderNo/false, true )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">output = array( propertyName<sup>1</sup>
- , array ( "value" => propertyData<sup>2</sup> )
- , "params" => params<sup>3</sup>))</p>
- <p class="label">Format 4</p>
- <p class="format">calendarComponent::getProperty( false, propOrderNo )</p>
- <p class="comment">propOrderNo = (int) specific property value</p>
- <p class="comment">Get propOrderNo X-property</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- if( false !== ( $d = $vcalendar->getProperty( "X-WR-TIMEZONE" )))
- echo $d[1];
- <span class="comment">// $d = array( "X-WR-TIMEZONE", propertyData<sup>2</sup> )</span>
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME, "file.ics" ); );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( )) {
- <span class="comment">// $xprop = array( propertyName<sup>1</sup>, propertyData<sup>2</sup> )</span>
- </p>
- <p class="label">Example 3</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME, "file.ics" ); );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( "X-ABC-MMSUBJ" )) {
- <span class="comment">// $xprop = array( "X-ABC-MMSUBJ", propertyData<sup>2</sup> )</span>
- </p>
- <p class="label">Example 4</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME, "file.ics" ); );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- while( $xprop = $vcalendar->getProperty( false, false, true )) {
- /*<span class="comment"> $xprop = array( propertyName<sup>1</sup>,
- array( "value" => propertyData<sup>2</sup> ),
- "params" => params<sup>3</sup> )</span>
- */
- </p>
- <h5>Set X-property</h5>
- <p>Insert property name and value. If an x-prop with the same name already exists, it will be replaced.</p>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setProperty( propertyName, propertyData [, params ] )</p>
- <p class="comment">propertyName<sup>1</sup> = (string) Any property name with a "X-" prefix
- propertyData<sup>2</sup> = (string) Value type TEXT
- params<sup>3</sup> = (array) ( ["LANGUAGE" => (string) "lang<sup>*</sup>"] *[, xparams] )
- xparams = (string) key => (string) value // <span class="comment">key prefix "X-"</span>
- lang<sup>*</sup> = as defined in [RFC5546]</p>
- <p class="label">Example</p>
- <p class="example">
- $component->setProperty("X-ABC-MMSUBJ","http://load.noise.org/mysubj.wav");
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Calendar_component_object_property_function_list">[up]</a>
- <a NAME="iCalcreator_component_configuration_methods"></a><h2>3.3 iCalcreator Component configuration methods</h2>
- <a name="Language_PROP"></a><h3>3.3.1 Language</h3>
- <p>
- Language for specific <strong>calendar</strong> component as defined in [RFC5546].<br>
- Language set at component level can be overridden by specific component property parameter.<br>
- A successful "setConfig" returns bool true.
- </p>
- <p>
- kigkonsult\iCalcreator\util\util::$LANGUAGE as used in code snippets is available.
- </p>
- <h5>Get language</h5>
- Language for <strong>calendar</strong> (only if language is set at component level).
- <p class="label">Format</p>
- <p class="format">calendarComponent::getConfig( "language" )</p>
- <p class="label">Example</p>
- <p class="example">
- $lang = $vevent->getConfig( kigkonsult\iCalcreator\util\util::$LANGUAGE );
- </p>
- <h5>Set LANGUAGE</h5>
- <p class="label">Format</p>
- <p class="format">calendarComponent::setConfig( "language", lang )</p>
- <p class="comment">lang = (string) language</p>
- <p class="label">Example</p>
- <p class="example">
- $vevent->setConfig( kigkonsult\iCalcreator\util\util::$LANGUAGE,
- "en" );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
- <a name="iCalcreator_component_object_misc_methods"></a><h2>3.4 iCalcreator component object misc. methods</h2>
- <p>Calendar component subcomponent functions.</p>
- <a name="deleteComponent_PROP"></a><h4>3.4.1 deleteComponent</h4>
- Remove subcomponent from component.
- <p class="label">Format</p>
- <p class="format">calendarComponent::deleteComponent( orderNumber )</p>
- <p class="comment">orderNumber = (int) component order Number</p>
- <p class="comment">Remove component with order number (1st=1, 2nd=2).</p>
- <p class="format">calendarComponent::deleteComponent( componentType [, componentSuborderNumber])</p>
- <p class="comment">componentType = (string) component type
- componentSuborderNumber = (int) component suborder number</p>
- <p class="comment">Remove component with component type (ex. "vevent")
- and order 1 alt. suborder number.</p>
- <p class="format">calendarComponent::deleteComponent( <a href="#UID">UID</a> )</p>
- <p class="comment">Remove component with <a href="#UID">UID</a>.
- N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
- <p class="label">Example 1</p>
- <p>Delete first subcomponent.</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $comp1 = $vcalendar->getComponent();
- $comp1->deleteComponent( 1 );
- </p>
- <p class="label">Example 2</p>
- <p>Delete all subcomponents.</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $comp1 = $vcalendar->getComponent();
- while( $comp1->deleteComponent( kigkonsult\iCalcreator\util\util::$LCVALARM )
- continue;
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
- <a name="getComponent_PROP"></a><h4>3.4.2 getComponent</h4>
- Get subComponent from component.
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::getComponent()</p>
- <p class="comment">Get next component until end-of-components.</p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::getComponent( int orderNumber )</p>
- <p class="comment">orderNumber = (int) component order number</p>
- <p class="comment">Get component with order number (1st=1, 2nd=2).</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::getComponent( string componentType [, int componentSuborderNumber])</p>
- <p class="comment">componentType = (string) component type
- componentSuborderNumber = (int) component suborder number</p>
- <p class="comment">Get (next) component with component type (until end-of-components)
- alt. component with component type and suborder number (1st=1, 2nd=2..).</p>
- <p class="label">Format 4</p>
- <p class="format">calendarComponent::getComponent( <a href="#UID">UID</a> )</p>
- <p class="comment">Get component with <a href="#UID">UID</a>.
- N.B <a href="#UID">UID</a> is NOT set for <a href="#VALARM">ALARM</a> / <a href="#VTIMEZONE">timezone</a> components.</p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$FILENAME => "file.ics" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar();
- $vcalendar->setConfig( $config );
- $vcalendar->parse();
- $comp1 = $vcalendar->getComponent());
- while( $subComp = $comp1->getComponent()) {
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
- <a name="newComponent_PROP"></a><h4>3.4.3 newComponent</h4>
- Create subcomponent (<a href="#VALARM">ALARN</a> / <a href="#VTIMEZONE">VTIMEZONE STANDARD</a> / <a href="#VTIMEZONE">VTIMEZONE DAYLIGHT</a>)
- using a component factory-method, returning a reference to the new component.
- <p class="label">Format</p>
- <p class="format">calendarComponent::newComponent( componentType )</p>
- <p class="comment">componentType = (string) component type</p>
- <p class="label">Example 1</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vevent = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVEVENT );
- // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- 2006, 12, 24, 19, 30, 00 );
- $vevent->setProperty(
- $valarm = $vevent->newComponent( kigkonsult\iCalcreator\util\util::$LCVALARM );
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- </p>
- <p class="label">Example 2</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config );
- $vtimezone = $vcalendar->newComponent( kigkonsult\iCalcreator\util\util::$LCVTIMEZONE );
- $vtimezone->setProperty(
- $standard = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCSTANDARD );
- $standard->setProperty(
- $daylight = $vtimezone->newComponent( kigkonsult\iCalcreator\util\util::$LCDAYLIGHT );
- $daylight->setProperty(
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
- <a name="setComponent_PROP"></a><h4>3.4.4 setComponent</h4>
- Add <strong>calendar</strong> component to the iCalcreator object instance or replace/update component in the iCalcreator object instance.
- <p class="label">Format 1</p>
- <p class="format">calendarComponent::setComponent( component )
- addSubComponent( component ) // <span class="comment">alias</span></p>
- <p class="comment">Insert last in component chain.</p>
- <p class="label">Format 2</p>
- <p class="format">calendarComponent::setComponent( component, int orderNumber )</p>
- <p class="comment">orderNumber = (int) component order number</p>
- <p class="comment">Replace component with order number(1st=1, 2nd=2).
- If orderNumber is not found, component is inserted last in chain.</p>
- <p class="label">Format 3</p>
- <p class="format">calendarComponent::setComponent( component, componentType [,componentSuborderNumber])</p>
- <p class="comment">componentType = (string) component type
- componentSuborderNumber = (int) component suborder number</p>
- <p class="comment">Replace component with component type and component order number.
- if orderNumber is not found, component is inserted last in chain. </p>
- <p class="label">Example</p>
- <p class="example">
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => "Europe/Stockholm" );
- $vcalendar = new kigkonsult\iCalcreator\vcalendar( $config ); // <span class="comment">initiate new CALENDAR</span>
- $vevent = new kigkonsult\iCalcreator\vevent();
- // <span class="comment">add some <a class="ref" href="#VEVENT">EVENT</a> properties</span>
- $vevent->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- 2006, 12, 24, 19, 30, 00 );
- $vevent->setProperty(
- $valarm = new kigkonsult\iCalcreator\valarm();
- $valarm->setProperty( kigkonsult\iCalcreator\util\util::$TRIGGER,
- $vevent->setComponent( $valarm );
- $vcalendar->setComponent( $vevent );
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#iCalcreator_component_configuration_methods">[up]</a>
- <a name="TimezoneXMLjsonvCard"></a><h1>4 Timezone, XML, json and vCard support</h1>
- <a name="timezoneHandler"></a><h3>4.1 iCalcreator and timezoneHandler class</h3>
- The timezoneHandler class has three utility methods: <a href="#createTimezone">createTimezone</a>,
- <a href="#ms2phpTZ">ms2phpTZ</a> and
- <a href="#transformDateTime">transformDateTime</a>.
- <a name="createTimezone"></a><h4>4.1.1 createTimezone</h4>
- <p>
- The (static) method, applied on a iCalcrator object instance and using a <em>PHP</em> valid (string) timezone,
- return <a href="#VTIMEZONE">vtimezone</a>, <a href="#STANDARD">standard</a> and <a href="#DAYLIGHT">daylight</a> components,
- based on <em>PHP</em> DateTimeZone class and the <em>PHP</em> time zone transition dates.
- </p>
- <p>
- Recommendation is to call the method <b>after</b> editing components (and without (period) from/to arguments, below),
- it will automatically create timezone components, starting seven month before lowest <a href="#DTSTART">DTSTART</a>
- value and end 18 month after the higest.
- </p>
- <p>
- If no time zone transition exists within date arguments or within the "<a href="#DTSTART">DTSTART</a>"s span,
- then the time zone transition with the highest transistion date before "from" date is used as base.
- If still missing, timezone components are created, using current date.
- </p>
- <p>
- Note, only when timezone NOT is UTC.
- For dates with UTC DATE-TIME, read <a href="#DATE_WITH_UTC_TIME">this</a>!
- </p>
- <p>
- Bool false is returned if not using a <em>PHP</em> valid timezone.
- </p>
- <p class="label">Format</p>
- <p class="format">timezoneHandler::createTimezone( calendar, timezone [, xprops, [, from [, to ]]] )</p>
- <p class="comment">calendar = (object) iCalcreator instance
- timezone = (string) valid timezone, acceptable by <em>PHP</em> DateTimeZone
- xprops = (array) ( *[ x-propName => value ] ), timezone non-standard properties
- from = (int) timestamp, period start date<sup>*</sup>
- to = (int) timestamp, period end date<sup>*</sup>
- <sup>*</sup> if empty "from" and "to" arguments, the calendar <a href="#getProperty2">getProperty</a> method (with "<a href="#DTSTART">DTSTART</a>" as argument)
- is used to get the lowest (modified, minus 7 month) and highest (modified, plus 15 month) dates.
- </p>
- <p class="label">Example</p>
- <p class="example">
- $tz = "Europe/Stockholm";
- $config = array( kigkonsult\iCalcreator\util\util::$UNIQUE_ID => "kigkonsult.se",
- kigkonsult\iCalcreator\util\util::$TZID => $tz );
- $c = new kigkonsult\iCalcreator\vcalendar( $config );
- $c->setProperty( "X-WR-TIMEZONE", $tz );
- // <span class="comment">insert components or parse an iCal file</span>
- $xprops = array( "X-LIC-LOCATION" => $tz );
- kigkonsult\iCalcreator\timezoneHandler::createTimezone( $c, $tz, $xprops );
- </p>
- <p>
- Output example (when using iCalcreator object createCalendar or returnCalendar methods):
- </p>
- <p class="example">
- BEGIN:VTIMEZONE
- TZID:Europe/Stockholm
- X-LIC-LOCATION:Europe/Stockholm
- BEGIN:STANDARD
- DTSTART:20111030T003000
- TZOFFSETFROM:+0200
- TZOFFSETTO:+0100
- TZNAME:CET
- END:STANDARD
- BEGIN:DAYLIGHT
- DTSTART:20110327T002000
- TZOFFSETFROM:+0100
- TZOFFSETTO:+0200
- TZNAME:CEST
- END:DAYLIGHT
- END:VTIMEZONE
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#timezoneHandler">[up]</a>
- <a name="ms2phpTZ"></a><h4>4.1.2 ms2phpTZ</h4>
- <p>
- The (static) ms2phpTZ method manages (a very simple) conversion of a MS timezone to a <em>PHP</em>5 valid (Date-)timezone,<br>
- matching (MS) UTC offset and time zone descriptors, based on <em>PHP</em> DateTimeZone class.
- </p>
- <p>If true is returned, the MS timezone argument (below) is converted to a <em>PHP</em>5 time zone, otherwise unaltered.</p>
- <p class="label">Format</p>
- <p class="format">timezoneHandler::ms2phpTZ( timezone )</p>
- <p class="comment">timezone = (string) MS timezone (input), PHP5 timezone (output)</p>
- <p class="label">Example</p>
- <p class="example">
- $search = '"(UTC-06:00) Central Time (US & Canada)"';
- echo "MS tz:'$search'<br>\n";
- if( false !== kigkonsult\iCalcreator\timezoneHandler::ms2phpTZ( $search ))
- echo "PHP tz:'$search'<br>\n";
- </p>
- <br>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#timezoneHandler">[up]</a>
- <a name="transformDateTime"></a><h4>4.1.3 transformDateTime</h4>
- <p>
- The (static) transformDateTime method transforms a datetime from a time zone to another. (Requires <em>PHP</em> DateTimeZone acceptable time zones).
- </p>
- <p>
- Bool false is returned if not using a "strtotime" acceptable datetime string or unacceptable <em>PHP</em> time zones.
- If true, the dateTime argument (below) is converted to the new time zone, otherwise unaltered.
- </p>
- <p>
- A DATE input (<year><month><day>) will be expanded to a DATETIME (<year><month><day>000000) before transform.
- </p>
- <p class="label">Format</p>
- <p class="format">timezoneHandler::transformDateTime( dateTime, timezoneFrom [, timezoneTo [, format ]] )</p>
- <p class="comment">
- dateTime = (array) ( "year" => (int) year // <span class="comment">alt. input</span>
- , "month" => (int) month
- , "day" => (int) day
- [, "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec ] )
- dateTime = (array) ( (int) year // <span class="comment">alt. input</span>
- , (int) month
- , (int) day
- [, (int) hour
- , (int) min
- , (int) sec ] )
- dateTime = (array) ( "timestamp" => (int) timestamp ) // <span class="comment">alt. input</span>
- dateTime = (string) datetime string<sup>*</sup> // <span class="comment">alt. input</span>
- dateTime = (string) datetime string // <span class="comment">on successful output</span>
- timezoneFrom = (string) a <em>PHP</em> (DateTimeZone) valid time zone
- timezoneTo = (string) a <em>PHP</em> (DateTimeZone) valid time zone, default "UTC"
- format = (string) output format (any date formatting, default "Ymd\THis")
- <br>datetime string<sup>*</sup> recommended formats
- "20110625", "2011-06-25", "2011/06/26"
- "20110625051015", "20110625 051015"
- "20110625T051015", "20110625t051015"
- "2011-06-25 05:10:15", "2011-06-25T05:10:15", "2011-06-25t05:10:15"
- "2011/06/25 05:10:15", "2011/06/25T05:10:15", "2011/06/25t05:10:15"
- other string formats, acceptable by <em>PHP</em> strtotime function, may (would) work
- <span class="comment">(notice <a href="#date_restriction">date restriction</a>)</span></p>
- <p class="label">Example</p>
- <p>Convert from time zone "Europe/Stockholm" to "UTC"</p>
- <p class="example">
- $d = date( "Y-m-d H:i:s" );
- $tzFr = "Europe/Stockholm";
- if( false !== kigkonsult\iCalcreator\timezoneHandler::transformDateTime( $d, $tzFr ))
- $event->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- $d . "Z" );
- else
- $event->setProperty( kigkonsult\iCalcreator\util\util::$DTSTART,
- $d,
- array( kigkonsult\iCalcreator\util\util::$TZID => $tzFr ));
- </p>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#timezoneHandler">[up]</a>
- <a name="TZhelpers"></a><h3>4.2 Timezone helper functions</h3>
- <p>
- Additional functions to use with vtimezone components, placed in the "iCal.tz.inc.php" file.
- </p>
- <p>
- Before calling the functions <a href="#getTzOffsetForDate">getTzOffsetForDate</a> and <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a>,
- set time zone 'GMT' (using 'date_default_timezone_set')!
- </p>
- <a name="getTzOffsetForDate"></a><h4>4.2.1 getTzOffsetForDate</h4>
- <p>
- The <a href="#getTzOffsetForDate">getTzOffsetForDate</a> function returns UTC offset information for specific date (timezone) based on output from <a href="#getTimezonesAsDateArrays">getTimezonesAsDateArrays</a> function.
- </p>
- <p>
- Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
- </p>
- <p>
- Returns array, time zone data for specific date (timestamp) with keys for
- </p>
- <ul>
- <li>"offsetHis" (+/-Hi[s])
- <li>"offsetSec"( UTC offset in seconds)
- <li>"tzname" (standard/daylight time zone name)
- </ul>
- <p class="label">Format</p>
- <p class="format">getTzOffsetForDate( timezonesarray, tzid, timestamp )</p>
- <p class="comment">timezonesarray = (array) output from getTimezonesAsDateArrays, below
- tzid = (string) time zone identifier
- timestamp = (mixed) the date in question (timestamp)
- or UTC datetime (array) ( "year" => (int) year
- , "month" => (int) month
- , "day" => (int) day
- , "hour" => (int) hour
- , "min" => (int) min
- , "sec" => (int) sec )</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="getTimezonesAsDateArrays"></a><h4>4.2.2 getTimezonesAsDateArrays</h4>
- <p>
- The function creates time zone transition information,
- based on vtimezone component contents in a iCalcreator vcalendar instance,
- using sub-function expandTimezoneDates.
- </p>
- <p>
- Before calling the function, set time zone 'GMT' ('date_default_timezone_set')!
- </p>
- <p>
- Returns an array containing time zone data from vtimezone standard/daylight instances (input to <a href="#getTzOffsetForDate">getTzOffsetForDate</a>, above).
- </p>
- <p class="label">Format</p>
- <p class="format">getTimezonesAsDateArrays( iCalobj )</p>
- <p class="comment">iCalobj= (object) iCalcreator vcalendar instance</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="XMLhelpers"></a><h3>4.3 iCalcreator and iCalXML class</h3>
- <p>
- The iCalXML class methods converts iCal into XML and parses XML into iCal.
- XML is defined by [RFC6321], "xCal: The XML Format for <strong>iCalendar</strong>".
- </p>
- <a name="iCal2XML"></a><h4>4.3.1 iCal2XML</h4>
- <p>The (static) iCal2XML method converts an iCalcreator object instance to XML.</p>
- <p>
- The iCal2XML method utilizes the SimpleXML extension (and "libxml" <em>PHP</em> extension).
- </p>
- <p>An rfc6321 XML string is returned.</p>
- <p class="label">Format</p>
- <p class="format">iCalXML::iCal2XML( iCalobj )</p>
- <p class="comment">iCalobj = (object) iCalcreator instance</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="XML2iCal"></a><h4>4.3.2 XML2iCal</h4>
- <p>
- The two entry methods: XMLstr2iCal and XMLfile2iCal converts XML to iCal, i.e. parses an XML string/file into an iCalcreator vcalendar instance.
- The methods are <b>not</b> using the <em>PHP</em> SimpleXML extension.
- </p>
- <p>
- On success, an iCalcreator vcalendar instance is returned.
- </p>
- <p>
- On (XML parse) error, bool false is returned.
- </p>
- <h5>XMLstr2iCal</h5>
- <p>
- The (static) method accepts a well-formed (rfc6321) XML string as argument.
- </p>
- <p class="label">Format</p>
- <p class="format">iCalXML::XMLstr2iCal( xmlstr [, config] )</p>
- <p class="comment">xmlstr = (string) rfc6321 XML
- config = (array) iCalcreator config array (opt)</p>
- <h5>XMLfile2iCal</h5>
- <p>
- The (static) method accepts an XML (rfc6321) local file or a remote URI, as argument.
- </p>
- <p class="label">Format</p>
- <p class="format">iCalXML::XMLfile2iCal( xmlfile [, config] )</p>
- <p class="comment">xmlfile = (string) rfc6321 XML file name or resource
- config = (array) iCalcreator config array (opt)</p>
- <h5>XML2iCal</h5>
- <p>
- This (static) method is doing the hard work in XMLstr2iCal/XMLfile2iCal methods.
- </p>
- <p class="label">Format</p>
- <p class="format">iCalXML::XML2iCal( xmlstr [, config] )</p>
- <p class="comment">xmlstr = (string) rfc6321 XML
- config = (array) iCalcreator config array (opt)</p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="iCal2jSon"></a><h3>4.4 iCalcreator and json export</h3>
- <p>
- You can export iCal (XML) as json using a iCalcreator vcalendar instance,
- <a href="#iCal2XML">iCalXML::iCal2XML()</a> (above),
- simplexml_load_string and json_encode as follows:
- </p>
- <p class="example">
- $xml = kigkonsult\iCalcreator\iCalXML::iCal2XML( $vcalendar );
- $json = json_encode( simplexml_load_string( $xml ));
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="vCardhelpers"></a><h3>4.5 iCalcreator and iCalvCard class</h3>
- <p>
- The iCalvCard class (static) methods produces simplified vCard output.
- </p>
- <a name="iCal2vCard"></a><h4>4.5.1 iCal2vCard</h4>
- <p>
- The (static) method converts a single <a href="#ATTENDEE">ATTENDEE</a>, <a href="#CONTACT">CONTACT</a> or
- <a href="#ORGANIZER">ORGANIZER</a> URI (in email format) into simplified vCard output or saved in vCard file.
- </p>
- <p>
- If argument directory is set, vCards are saved in (directory/) files, named like <firstName>.<familyName>."ext".
- </p>
- <p>
- Returns vCard string or true if a valid directory is used as argument (and file write ok)
- otherwise bool false.
- </p>
- <p class="label">Format</p>
- <p class="format">iCalvCard::iCal2vCard( email [ ,version [ ,directory [ ,ext ]]] )</p>
- <p class="comment">
- email = (string) ATTENDEE, CONTACT or ORGANIZER URI in email format
- version = (string) vCard version, default "2.1", opt. "3.0"/"4.0"
- directory = (string) if and where to save vCards files (write rights required), default bool false
- ext = (string) vCard file extension, default "vcf"
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="iCal2vCards"></a><h4>4.5.2 iCal2vCards</h4>
- <p>
- The (static) method collects and converts all <a href="#ATTENDEE">ATTENDEE</a>s, <a href="#CONTACT">CONTACT</a>s and
- <a href="#ORGANIZER">ORGANIZER</a>s (URI, in email format) into simplified vCard (string) output or
- saved in vCard files, using <a href="#iCal2vCard">iCal2vCard</a> function (above).
- </p>
- <p>
- The file name formatting and return values are described above in <a href="#iCal2vCard">iCal2vCard</a> function.
- </p>
- <p class="label">Format</p>
- <p class="format">iCalvCard::iCal2vCards( vcalendar [ ,version [ ,directory [ ,ext ]]] )</p>
- <p class="comment">
- vcalendar = (object) iCalcreator object instance
- version = (string) vCard version, default "2.1", opt. "3.0"/"4.0"
- directory = (string) if and where to save vCards files (write rights required), default bool false
- ext = (string) vCard file extension, default "vcf"
- </p>
- <p class="comment">
- Return (bool) true if argument directory is not null, otherwise vCard string.
- </p>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#TimezoneXMLjsonvCard">[up]</a>
- <a name="Copyright_and_Licence"></a><h1>5 COPYRIGHT AND LICENSE</h1>
- <table>
- <tr><td>Copyright<td>(c) 2007-2017 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
- <tr><td>Link <td>http://kigkonsult.se/iCalcreator/index.php
- <tr><td>Package <td>iCalcreator
- <tr><td>Version <td>2.24
- <tr><td class="top">License <td>
- Subject matter of licence is the software iCalcreator.<br>
- The above copyright, link, package and version notices,
- this licence notice and the [rfc5545] PRODID as implemented and
- invoked in iCalcreator shall be included in all copies or
- substantial portions of the iCalcreator.<br>
- iCalcreator can be used either under the terms of
- a proprietary license, available at <a href="https://kigkonsult.se/"><https://kigkonsult.se/></a><br>
- or the GNU Affero General Public License, version 3:<br>
- iCalcreator is free software: you can redistribute it and/or
- modify it under the terms of the GNU Affero General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.<br>
- iCalcreator is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.<br>
- You should have received a copy of the GNU Affero General Public
- License along with this program.
- If not, see <a href="http://www.gnu.org/licenses/"><http://www.gnu.org/licenses/></a>.
- </table>
- <br>
- <a href="#INDEX">[index]</a> <a href="#top">[top]</a> <a href="#Copyright_and_Licence">[up]</a>
- </body>
- </html>
|